Page 1 of 1
Date problem ?
Posted: Thu Apr 26, 2012 11:35 pm
by jesperbrannmark
Maybe I just need some sleep, but I just tried this in 4.61b2. Just after that I tried it in GFABASIC and got the correct date...
Can someone confirm/deny this, is it a bug in 4.61b2 or should i just ... sleep for a few hours and..
Note my clock in the lower right hand corner says 2012-04-27, while the debug output window says 2012-04-26 using the code
Code: Select all
Debug FormatDate("%yyyy-%mm-%dd",Date())

Re: Date problem ?
Posted: Fri Apr 27, 2012 12:55 am
by electrochrisso
Works Ok here jesperbrannmark, PB460x86, win7 starter.
I notice the time is 26 min past midnight, I wonder if you do it after 1 hour past, the date changes.
There has been some posts about time being 1 hour out, check the bug reports.
Re: Date problem ?
Posted: Fri Apr 27, 2012 1:04 am
by juror
electrochrisso wrote:Works Ok here jesperbrannmark, PB460x86, win7 starter.
I notice the time is 26 min past midnight, I wonder if you do it after 1 hour past, the date changes.
There has been some posts about time being 1 hour out, check the bug reports.
PB4.60 or PB4.61B2?
Re: Date problem ?
Posted: Fri Apr 27, 2012 2:07 am
by electrochrisso
Hi juror, if you want to know if I am using beta, no, not yet, just 460 for the time being.
Re: Date problem ?
Posted: Fri Apr 27, 2012 3:46 am
by skywalk
Confirmed on 461b2 x86.
Please add a bug report.
I think Date() needs an additional TimeZone parameter?
Code: Select all
Debug FormatDate("%yyyy-%mm-%dd",Date(2012,04,26,0,0,0)) ;<-- 2012-04-27
Re: Date problem ?
Posted: Sun Apr 29, 2012 11:40 am
by Warmonger
skywalk wrote:Confirmed on 461b2 x86.
Please add a bug report.
I think Date() needs an additional TimeZone parameter?
Code: Select all
Debug FormatDate("%yyyy-%mm-%dd",Date(2012,04,26,0,0,0)) ;<-- 2012-04-27
That wouldn't make much sense as all dates displayed from PureBasic are based on the machines date. TimeZone's and all that shouldn't matter at all when it comes to pulling the time and date information from Windows.
Re: Date problem ?
Posted: Sun Apr 29, 2012 11:54 am
by STARGĂ…TE
no problem here:
Code: Select all
Debug FormatDate("%yyyy-%mm-%dd",Date(2012,04,26,0,0,0))
2012-04-26
PB 4.60 & PB 4.61B2; Win XP x86, germany
Re: Date problem ?
Posted: Sun Apr 29, 2012 3:28 pm
by skywalk
Fred fixed this time zone problem with a Date lib patch.
http://www.purebasic.fr/english/viewtop ... 85#p379285