Overview
Features
Download
Documentation
Community
Add-Ons & Services

LocalDateTime timestamp bug ?

Please post support and help requests here.

LocalDateTime timestamp bug ?

Postby rd » 02 Sep 2008, 15:12

Hi, when I call the timestamp() function of a LocalDateTime, I don't get a UTC timestamp but a 'local' timestamp. Because timestamp is defined in the documentation as an UTC time this seems to be a bug to me.

Calling LocalDateTime utc().timestamp() returns the correct UTC timestamp, so I think this should replace the current timestamp() function.

Ronny
rd
 
Posts: 19
Joined: 16 Jun 2007, 15:30

Re: LocalDateTime timestamp bug ?

Postby alex » 10 Sep 2008, 20:18

^> Hi, when I call the timestamp() function of a LocalDateTime, I don't get a UTC timestamp but a 'local' timestamp. Because timestamp is defined in the documentation as an UTC time this seems to be a bug to me.

> Calling LocalDateTime utc().timestamp() returns the correct UTC timestamp, so I think this should replace the current timestamp() function.^

I guess it depends on interpretation. I would argue that Timestamp, when declared by itself is UTC-based, whereas when returned from ))LocalDateTime(( reflects the local timezone settings. But I could be wrong.

Guenter?

Alex
alex
 
Posts: 1099
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: LocalDateTime timestamp bug ?

Postby guenter » 10 Sep 2008, 21:55

Hmm, I am not sure what the original intent was when this was implemented. Since there is a workaround with utc().timestamp(), we should probably leave it as it is for now and document it.
guenter
 
Posts: 1110
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests