can we specific Ksql table start time - apache-kafka

I have a requirement to create window that start at 5 am and last for 24 hours
I can not find a way to specify window start time , only how to define window size
if I defined it as 24 it automatically start at 12 am
any help?

ksqlDB windows start at the UNIX epoch (00:00:00 UTC on 1 January 1970) and this cannot be changed.

Related

how to get previous day date in unix/SunOS

I am using below code
TZ=Etc/GMT+169 date '+%m/%d/%Y'
but above code print the current date
the Idea is I want to go behind 7+ more days in unix system for that I am just adding 24 to GMT It is working for 6 days only. If I increase GMT value after 169 it is printing current date.

DHTMLX Scheduler Start_hour

I have two questions related to DHTMLX
QUESTION 1: how to start_hour with minutes.
Start_hour_image
QUESTION 2: how to start_hour with PM (Post Meridiem)
Start_hour_with_pm
Minutes are not supported in first_hour config, in Day/Week/Unit views you can set only hour as a minimum value for the scale.
You can block time from 05:00 to 05:30 to prevent events creation.
Start minutes on the scale can be configured only in Timeline view.
To start from 5pm, set
scheduler.config.first_hour = 17;
It doesn't mean that current date 17:00-24:00 and the next day till 10:00 (if you set, for example, "last_hour = 10") will be rendered on the scale. You need to set values for these configs within one day. I.e. 0:00 <= first_hour < last_hour <= 24:00.

How can I express 24 hour time as 12 hour time when using timestamp without timezone in PostgreSQL 9.1?

How can I express 24 hour time as 12 hour time when using timestamp without timezone in PostgreSQL 9.1?
More specifically, I inserted order data into a database and I need to extract it back in its original state.
Original data: 06/10/2013 12:43:30
Data in DB: 2013-06-10 04:43:30+00
If I query order data like:SELECT order_date AT TIME ZONE('EDT') ...
I return 2013-06-10 00:43:30
I need the 00 in the time to show as 12. How can I do this?
User to_char():
SELECT to_char('2013-06-10 00:43:30'::timestamp, 'DD/MM/YYYY HH12:MI:SS PM')
I added PM to make the output unambiguous. Consider available patterns in the manual.

Mongodb date is off by 1 hour

I am running mongodb on ubuntu server. The server time is
root# date
Thu Sep 13 21:15:58 BST 2012
But when I run the following command I get a different result
root# mongo
MongoDB shell version: 2.2.0
connecting to: test
> new Date()
ISODate("2012-09-13T20:15:58.670Z")
There is exactly one hour difference. When I update a documents updated_on field with php using MongoDate(), the value of the field is still 1 hour off.
[EDIT]
Actually I just checked my php error log and the time in the log file is 1 hour off as well
[13-Sep-2012 20:11:14 UTC] Log Message (Time should be 21:11:14)
Mongo tells you
2012-09-13T20:15:58.670Z
Z = Zulu time / Zero offset / UTC. You can also express the time in that TZ as 2012-09-13T20:15:58.670+00:00, as defined in the ISO8601 standard by the way.
BST is UTC+1. So, they are the same time but in different time zones.
You can resolve this issue by displaying the DateTime with ToLocalTime method.
MVC C# Example: #Model.StartDate.ToLocalTime()
This is due to the way MongoDB store datetime in BST format. So the daylight savings time or the time zone of the server will have an effect on the actual date time returned to the application. This simple code will be able to format as usual with ToString("dd MMMM yyyy hh:mm tt") or any other format based on your requirements.
Here you need to understand a concept in time setting in clocks called daylight saving time. In some countries around the world the clock is advanced by 1 or more hours to experience day light by one more hour. The difference between IST and GST is 5.30 hrs but the actual time difference is between New Delhi and London time is 6.30 hrs. See this article from 4GuysFromRolla for setting and using server time.
On windows change your timezone.
Controll Panel -> Date and Time -> Change on timezone -> (UTC) Coordinated universal time.
And then just change your time

facebook api date format

I've been working on facebook application. But I've faced with strange bug(?).
It I'm trying to get detailed info about any event using graph api start_date differs from the one if I'm trying to get it using fql. for example:
https://graph.facebook.com/209798352393506/ - start date is 2011-05-26T19:00:00
https://api.facebook.com/method/fql.query?query=select%20eid%2C%20name%2C%20tagline%2C%20pic%2C%20host%20%2C%20start_time%20from%20event%20where%20eid%20%3D209798352393506 - start time is 1306461600. Which in human readable format equals to Fri, 27 May 2011 02:00:00 GMT.
As you can see difference between got dates is 5 hours. Somtimes I'm getting dates which differ for 8 hours, sometimes - 6.
Correct date is the first one:
http://www.facebook.com/events/209798352393506/
I can't figure out what happens. All events I'm trying to view are from Denmark. My timezone is Europe/Kiev. Difference is 1 hour.
Is this a facebook's bug? Or documented feature? Or am I doing something wrong?
Link to the documentation or another answer in stackoverflow would be enough.
Here is two events
http://www.facebook.com/events/290600150977115/ - starts on 2012-03-22 at 20:00
http://www.facebook.com/events/289501924395338/ - starts on 2012-03-03 at 21:00
But. Using FQL I'm getting that first event starts on 2012-03-23 at 04:00. Difference is 8 hours. And the second one starts on 2012-03-04 at 06:00. In this case difference is 9 hours. Why???
It was because of daylight saving time.
Time difference between me and facebook(Los Angeles) sometimes was 8 sometimes 9 hours, because there was a moment when Denmakr alredy changed their time to summer time and los angeles - not.
The problem occured when event started "in winter time" and finished in summer time. In this case I needed to add one hour.
Facebook is weird.
From /fql/insights/
The end of the period during which the metrics were collected, expressed as a unix time (which should always be midnight, Pacific Daylight Time) or using the function end_time_date() which takes a date string in 'YYYY-MM-DD' format.
2011-05-26T19:00:00 ===> 2011-05-26T19:00:00 PDT ===> Fri, 27 May 2011 02:00:00 GMT.