Date problem ?

Windows specific forum
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Date problem ?

Post 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())
Image
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: Date problem ?

Post 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.
PureBasic! Purely the best 8)
juror
Enthusiast
Enthusiast
Posts: 233
Joined: Mon Jul 09, 2007 4:47 pm
Location: Courthouse

Re: Date problem ?

Post 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?
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: Date problem ?

Post by electrochrisso »

Hi juror, if you want to know if I am using beta, no, not yet, just 460 for the time being.
PureBasic! Purely the best 8)
User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Date problem ?

Post 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
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Warmonger
Enthusiast
Enthusiast
Posts: 156
Joined: Wed Apr 20, 2011 4:24 pm

Re: Date problem ?

Post 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.
Its Not A Bug, Its An Undocumented Feature!
Relax Its All Just Ones And Zeros
There Is No Place Like 127.0.0.1 Except ::1
I do things TO my computer, not WITH my computer... I am a nerd.
User avatar
STARGÅTE
Addict
Addict
Posts: 2261
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Date problem ?

Post 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
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Date problem ?

Post by skywalk »

Fred fixed this time zone problem with a Date lib patch.
http://www.purebasic.fr/english/viewtop ... 85#p379285
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply