This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
RawOffset = 19800000 useDaylightTime = false
date = Mon Jan 01 05:53:20 IST 1900 offset = 21200000 getTime = -2208988800000
date = Mon Jan 01 05:29:59 IST 1900 offset = 19800000 getTime = -2208988801000
I am confused why diff of 1 sec at threshold of timezone offset of 05:30 is converting date to 05:53:20 when
the raw date millis have changed correctly by 1 sec. You can see that offset has also shifted by 23:20 so
addition of 23:20 can be understood but why should it happen ? How can I get correct time of 05:30 if its
I tried to run your code and this is my output. I dont see anything wierd here:
Joined: May 26, 2008
sai prashanth wrote:I tried to run your code and this is my output. I dont see anything wierd here:
Thanks Sai prashanth have you tried with IST (india not Irish i.e. GMT+0530) rather than CST timezone ?
Please noticed offset values 19800000 and 21200000 that is causing problem I believe.
another thing is that from 05:29:59 to 05:30:00 there is jump of 00:23:20 and after that
it increments linearly with input value.
See specifically the section on three-letter timezone names.
Joined: May 26, 2008
Thanks to all who contributed to this thread,
It Seems that there is No problem with IST. The history of IST (Indian Standard Time) Like that only.
Before 1900 there was no definition of IST.
initially IST was using Madras (Chennai) Time then Kolkata time then after Independence in 1947
its using Ujain i.e. Meridian Passing through almost centre of the state so there are three different
offsets the listing below clearly indicates that. During analysis of this issue I learnt that timezones
are fixed by Politicians and not by scientists thats why there are many such issues to be dealt with
by programmers by simply setting time zone to GMT+0530 all the date time issues get vanished.