dst

R - UTC to LOCAL time given Olson timezones

試著忘記壹切 提交于 2019-12-01 08:30:34
问题 I have time series data from 1974-2013 with a column for datetimeUTC (YYYY-MM-DD hh:mm +0000), and a column for the timezones in Olson format (e.g., Canada/Pacific, Canada/Eastern). I can convert the whole UTCdatetime column to a common timezone like this: dataset$datetimeEST <- strptime( dataset$datetimeUTC, format="%Y-%m-%d %H:%M:%S%z", tz="Canada/Eastern" ) How do I convert datetimeUTC to datetimeLOCAL , given the corresponding timezone in each row? Let me back up a bit. I have data from

Australia DST timezone abbreviation incorrect when using date_default_timezone_set

拜拜、爱过 提交于 2019-12-01 08:23:45
I'm trying to represent a UTC timestamp in different timezones using PHP's date_default_timezone_set function. Daylight saving has just kicked in here (NZ) and in Australia, and I'm getting mixed results... Here's some test code... date_default_timezone_set('NZ'); print '<p>NZ time is ' . date('Y-m-d H:i:s T (I)') . '</p>'; date_default_timezone_set('Australia/NSW'); print '<p>NSW time is ' . date('Y-m-d H:i:s T (I)') . '</p>'; date_default_timezone_set('Australia/North'); print '<p>NT time is ' . date('Y-m-d H:i:s T (I)') . '</p>'; date_default_timezone_set('Australia/South'); print '<p>SA

JodaTime - how can I know whether a daylight saving occurs within a specified period of time?

╄→尐↘猪︶ㄣ 提交于 2019-12-01 06:14:17
I need to know whether the period defined by: DateTime start; DateTime end; has a DST inside. I am iterating over collection of periods defined by {start,end} and shifting start and end 24 hours forward in every iteration. The resulting period starts at midnight and ends at 1 ms before next midnight. I found that if the period has a daylight saving point inside the shift produces incorrect result, e.g: having: Duration targetDuration = new Duration(24*60*60*1000L-1); DateTime start = new DateTime("2012-03-10T00:00:00.000-08:00"); DateTime end = new DateTime("2012-03-10T23:59:59.999-08:00");

Java 1.7 change in daylight savings is not recognized

亡梦爱人 提交于 2019-12-01 05:58:54
问题 Java: ver 1.7 update 71 DB: MySQL ver 5.6.x We are having multiple applications running accessing same DB. Two applications are running on Tomcat 7 (ver 7.0.52) and two applications are using Netty 3.10. The servers are on EST (US) time zone. Web Application Tech Stack: Spring 3.1.x Struts MVC 2.3.14 Hibernate 3.3.x Netty Application Tech Stack: Netty 3.10 Hibernate 3.3.x We are using many of the Apache log4j, commons libraries across the apps. During recent change in daylight savings time,

python pandas TimeStamps to local time string with daylight saving

非 Y 不嫁゛ 提交于 2019-12-01 05:37:05
问题 I have a dataframe with a TimeStamps column. I want to convert it to strings of local time, ie with daylight saving. So I want to convert ts[0] below to "2015-03-30 03 :55:05". Pandas seems to be aware of DST, but only when you call .values on the series. Thanks (Pdb) ts = df['TimeStamps'] (Pdb) ts 0 2015-03-30 02:55:05.993000 1 2015-03-30 03:10:20.937000 2 2015-03-30 10:09:19.947000 Name: TimeStamps, dtype: datetime64[ns] (Pdb) ts[0] Timestamp('2015-03-30 02:55:05.993000') (Pdb) ts.values

JodaTime - how can I know whether a daylight saving occurs within a specified period of time?

ぐ巨炮叔叔 提交于 2019-12-01 04:12:39
问题 I need to know whether the period defined by: DateTime start; DateTime end; has a DST inside. I am iterating over collection of periods defined by {start,end} and shifting start and end 24 hours forward in every iteration. The resulting period starts at midnight and ends at 1 ms before next midnight. I found that if the period has a daylight saving point inside the shift produces incorrect result, e.g: having: Duration targetDuration = new Duration(24*60*60*1000L-1); DateTime start = new

JAVA TimeZone issue EDT Vs EST

核能气质少年 提交于 2019-12-01 03:30:57
I a newbie to java and hence haven't been able figure this out since quite some time. I am using Windows XP and the machine is set to TimeZone: Eastern Time (US & Canada) . I have a Java application, which takes the current system time and timezone info and writes a string like: 20101012 15:56:00 EST, to a file. The last piece of Date above, i.e.: the timezone, changes from EST to EDT as i change my system date. Being precise: From November(eg: Nov2009) to March (Mar 2010), it is EST, otherwise EDT. EST is what I want ALWAYS and not EDT. Is there any particular class / function, by which I can

problems with Java daylight savings time

旧巷老猫 提交于 2019-11-30 20:19:09
I have a Java app that needs to be cognizant of the time zone. When I take a Unix epoch time and try to convert it into a timestamp to use for an Oracle SQL call, it is getting the correct timezone, but the timezone "useDaylightTime" value is not correct, i.e., it is currently returning "true", when we are NOT in DST (I am in Florida in TZ "America/New_York"). This is running on Red Hat Linux Enterprise 6, and as far as I can tell, it is correctly set up for the timezone, e.g. 'date' returns: Wed Nov 28 12:30:12 EST 2012 I can also see, using the 'zdump' utility, that the current value for

Ways to deal with Daylight Savings time with Quartz Cron Trigger

可紊 提交于 2019-11-30 20:13:23
I have a quartz cron trigger that looks like so: <bean id="batchProcessCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="batchProcessJobDetail" /> <property name="cronExpression" value="0 30 2 * * ?" /> </bean> How should I solve this, if I have several configurations that happen within the 2-3am period? Is there an accepted best practice? Relevant link: http://www.quartz-scheduler.org/docs/faq.html#FAQ-daylightSavings Basically it says "Deal with it." But my question is how! I solved it using a separate trigger that only fires (an hour

does php's date_default_timezone_set adjust to daylight saving?

若如初见. 提交于 2019-11-30 19:30:51
Does php's date_default_timezone_set adjust to daylight saving? I have this code, and wonder if it will always result in the correct Stockholm time? date_default_timezone_set('Europe/Stockholm'); $timestamp = date("Y-m-d H:i:s"); Yes this should always result in the right time. PHP doesn't handle DST automatically. You have to check if (date('I', time()) == 1) ... the time is in DST mode ("0" = not) Then you should adust time accordingly. (Note: 'I' in capital. I have just checked it and it works.) As long as your timezone is listed in the following link, timestamp should be relative to the