dst

WeBid: Timezones with daylight savings time not calculated correctly

混江龙づ霸主 提交于 2019-12-12 13:13:09
问题 I'm currently using an open source application: WeBid (available here) Here is the issue: The user has a preferred timezone stored in DB The site has a default timezone stored in DB All db stored dates are stored at "GMT-0" The application doesn't calculate the DST (Daylight Savings Time) correctly as it uses the following code: (includes/functions_global.php) $this->ctime = time() + (($this->SETTINGS['timecorrection'] + gmdate('I')) * 3600); $this->tdiff = ($this->SETTINGS['timecorrection']

Why does momentjs isDST() return wrong time when zone() is used

和自甴很熟 提交于 2019-12-12 12:13:28
问题 I'm trying to check for isDST() (returns true or false if daylight saving time is active). It works fine if I use the current date time- for example var isdst = moment().isDST() returns true for my timezone. However, what I want to do is first set the timezone offset and then check to see if daylight saving time is active in that timezone. I have the following code below. var isdst = moment('2014-03-28').zone('+01:00'); console.log('daylight savings for +0100 is ' + isdst); //returns true

Converting from java.util.TimeZone to org.joda.DateTimeZone

拈花ヽ惹草 提交于 2019-12-12 10:54:18
问题 How is it possible in Java to convert an instance of java.util.TimeZone to org.joda.DateTimeZone and keeping the daylight saving time? 回答1: Joda-Time in maintenance-mode The Joda-Time project, now in maintenance mode, advises migration to the java.time classes. java.time.ZoneId The modern replacement for java.util.TimeZone is java.time.ZoneId & java.time.ZoneOffset. You should avoid the old legacy date-time classes. But if necessary, you can convert to/from the java.time types. Look to new

Turkey Continues on Daylight Saving Time From 2016 - Impact on Postgresql

こ雲淡風輕ζ 提交于 2019-12-12 03:09:52
问题 what is impact on Postgresql databases? Jobs ,date columns datas will be affected? 回答1: postgresql uses the zoneinfo database for time zone computations. The database's 2016g version which was released 2 weeks ago, includes an update to handle the situation for Turkey correctly. For now, you'll have to wait for the postgresql developers to pull the latest version of zoneinfo into postgresql and then release a new version. You can check what postgres thinks for Turkey's timezone as follows: $

Pytz convert time to UTC without DST

假装没事ソ 提交于 2019-12-11 16:48:59
问题 I've done a quite a bit of research before posting this, but I can't seem to get the conversion right. I have some data which has timestamps, and some have DST applied, and others don't. I thought the correct way to specify that it's without DST is using the is_dst parameter for pytz. All 3 options give the same offset from UTC, which is incorrect. The offset should be +1000. What's the best way to do this conversion, and why does the is_dst parameter not make any difference? pytz_eastern

Google Script Date Showing wrong “hours”

别等时光非礼了梦想. 提交于 2019-12-11 15:12:10
问题 I feel as if I have poured over nearly all of the documentation regarding dates in JS and GAS. Especially concerning DST issues. Since I have not had a problem like this until the DST change. I think I am missing something simple. The problem is that despite messing with all of the settings the hours on my date output from the format utility are still incorrect. Below is a screen shot of the debugger and a snippet of the code i am running. The value 'date' is the one that I am concerned with.

Issue with inDaylightTime() and determing if a date is in daylight savings time

落爺英雄遲暮 提交于 2019-12-11 14:15:14
问题 Have been beating my head against this and not sure what I'm doing wrong here. I am testing out the inDaylightTime() method for a certain time zone but it is returning "false" when it should be returning "true" in this case. import java.util.TimeZone; import java.util.Date; public class TimeZoneDemo { public static void main( String args[] ){ Date date = new Date(1380931200); // Sat, 05 Oct 2013, within daylight savings time. System.out.println("In daylight saving time: " + TimeZone

convert gmt to local timezone in pandas

倾然丶 夕夏残阳落幕 提交于 2019-12-11 12:08:52
问题 I have a gmt timestamp and I need to convert it into a local timezone ( taking into account daylight saving ). do you know how to do that in pandas? thanks! 回答1: tz_localize is a possible candidate. http://pandas.pydata.org/pandas-docs/version/0.17.1/generated/pandas.Series.tz_localize.html 来源: https://stackoverflow.com/questions/34584500/convert-gmt-to-local-timezone-in-pandas

.net adds one hour to summer dst [duplicate]

我的梦境 提交于 2019-12-11 09:52:07
问题 This question already has answers here : Date Conversion issue from webservice (2 answers) Closed 4 years ago . I'm getting a following string from a web service 2013-10-15T12:54:18+01:00 . This date is in the summer DST and my .NET code (web service proxy, I presume) automatically adds one hour to it. The same is not the case if the returned value falls withing the winter DST. The time returned ( 12:54:18 ) is what I want to display, I don't want any sort of recalculation to be done. I'm

Daylight Savings Time wrongly identified by Node.js

青春壹個敷衍的年華 提交于 2019-12-11 09:47:19
问题 I'm having an issue with timezones, DST and Node.js. It doesn't identify correctly DST effects. My OS is Windows 8.1 and have the timezone value and DST well set. I tried these two methods: 1) Node's Date Object I typed the following code in Node Prompt and received the answer in italic: new Date() Tue Sep 09 2014 18:42:36 GMT-0200 (Horário brasileiro de verão(Brazilian Daylight Savings Time)) However, the brazilian DST starts just in Oct 19th, we are not in DST right now. Therefore, the hour