It is currently Wed May 22, 2013 1:37 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Date problem ?
PostPosted: Thu Apr 26, 2012 11:35 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 16, 2009 10:42 am
Posts: 531
Location: sweden
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:
Debug FormatDate("%yyyy-%mm-%dd",Date())

Image


Top
 Profile  
 
 Post subject: Re: Date problem ?
PostPosted: Fri Apr 27, 2012 12:55 am 
Offline
Enthusiast
Enthusiast

Joined: Mon May 14, 2007 2:13 am
Posts: 731
Location: Darling River
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 Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
 
 Post subject: Re: Date problem ?
PostPosted: Fri Apr 27, 2012 1:04 am 
Offline
User
User

Joined: Mon Jul 09, 2007 4:47 pm
Posts: 67
Location: Right Here
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?


Top
 Profile  
 
 Post subject: Re: Date problem ?
PostPosted: Fri Apr 27, 2012 2:07 am 
Offline
Enthusiast
Enthusiast

Joined: Mon May 14, 2007 2:13 am
Posts: 731
Location: Darling River
Hi juror, if you want to know if I am using beta, no, not yet, just 460 for the time being.

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
 
 Post subject: Re: Date problem ?
PostPosted: Fri Apr 27, 2012 3:46 am 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 1383
Location: Boston, MA
Confirmed on 461b2 x86.
Please add a bug report.
I think Date() needs an additional TimeZone parameter?

Code:
Debug FormatDate("%yyyy-%mm-%dd",Date(2012,04,26,0,0,0))  ;<-- 2012-04-27

_________________
To understand recursion, you must first understand recursion. ~ unknown
I never make stupid mistakes. Only very, very clever ones. ~ John Peel


Top
 Profile  
 
 Post subject: Re: Date problem ?
PostPosted: Sun Apr 29, 2012 11:40 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Apr 20, 2011 4:24 pm
Posts: 156
skywalk wrote:
Confirmed on 461b2 x86.
Please add a bug report.
I think Date() needs an additional TimeZone parameter?

Code:
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.


Top
 Profile  
 
 Post subject: Re: Date problem ?
PostPosted: Sun Apr 29, 2012 11:54 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 711
Location: Germany, Glienicke
no problem here:
Code:
Debug FormatDate("%yyyy-%mm-%dd",Date(2012,04,26,0,0,0))

Quote:
2012-04-26


PB 4.60 & PB 4.61B2; Win XP x86, germany

_________________
Image


Top
 Profile  
 
 Post subject: Re: Date problem ?
PostPosted: Sun Apr 29, 2012 3:28 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 1383
Location: Boston, MA
Fred fixed this time zone problem with a Date lib patch.
http://www.purebasic.fr/english/viewtopic.php?p=379285#p379285

_________________
To understand recursion, you must first understand recursion. ~ unknown
I never make stupid mistakes. Only very, very clever ones. ~ John Peel


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye