![]() |
timevar2 is off?
As of writing this:
http://www.epochconverter.com/ Says the Unix Epoch Time is: 1390323226 At the same time, I echoed timevar2. Says timevar2 is equal to: 1390321106.845321893 Even using formatTimeString("", timevar2) now retrieves a time about 6 hours and 35 minutes off of the correct time. Can anyone enlighten me on this? Edit: getutctime() is also off by the same. Edit2: In case you're feeling lazy, it appears off by 2120. Edit3: It's only off by 35 minutes using the 2120 logic. I said it's off by 6 hours because using formatTimeStr() on it now yields time in EST. I suppose this was an internal fix Stefan made for some reason? It's unnecessary. My scripts wanted EST and so I just did -= 21600 in them. I removed my -= 21600 correction for EST and I have implemented a temporary += 2120 offset fix until this is sorted out. |
Time in everything Graal related has been off for so long. EG: Scroll to the bottom of any forum page and look at what time it says it is, then look at your computer's clock.
http://i.imgur.com/etd0Tz3.png |
Quote:
Somebody has very recently messed with formatTimeString() (corrected it into EST) and timevar2 (off by 2120) and made them incorrect. The classic timevar also sucks. It does not truly update every 5 seconds. If you implement a time system off of timevar, you will find the time it yields you being off by about 1 day every 6 months. There is no reason that timevar2, which should just directly read out the unix time, is off. Needs fix. |
|
Didn't know it was already covered. Thanks for bringing that up.
Very annoying. |
No problem, I actually remembered seeing it before but couldn't remember which sub forum it was in. I should bookmark for the workaround function example..
|
These are the two functions I wrote:
PHP Code:
this.event_start = determinetimevar2("2014-01-21 18:00:00 CST"); Then using server's timevar2 and comparing it against this.event_start. |
| All times are GMT +2. The time now is 10:01 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.