GnuCash
Contact   Instructions
Bug 795080 - Some dates reset to 01/01/1970
Summary: Some dates reset to 01/01/1970
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: User Interface General (show other bugs)
Version: 3.0
Hardware: Other Mac OS
: Normal normal
Target Milestone: future
Assignee: ui
QA Contact: ui
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-08 14:41 EDT by Vishal Mistry
Modified: 2018-11-02 13:49 EDT (History)
4 users (show)

See Also:


Attachments

Description Vishal Mistry 2018-04-08 14:41:47 EDT
When entering or modifying a transaction, for some dates the date gets reverted to 01/01/1970

Example:

* Begin entering a new transaction for date 26/10/2014 and tab out of the field
* Notice the date has changed to 01/01/1970

This happened on another date in 2015, but I didn't to note it down.
Comment 1 John Ralls 2018-04-08 15:28:39 EDT
What's your timezone, and was there a DST transition on 26 October 2014?
Comment 2 Vishal Mistry 2018-04-08 15:35:07 EDT
My current timezone is British Summer Time and (according to Google) DST for the UK was between 30 March 2014 and 26 October 2014
Comment 3 John Ralls 2018-04-12 18:23:43 EDT
Thanks. Turns out that at least in Apple's TZInfo file that transition happened at 23:00 BST, making midnight ambiguous as to whether it's DST or not. That caused the time constructor to throw, returning a 0 time. I added a workaround in the catch block to try again 3 hours later then correct the result. That seems to work.
Comment 4 John Ralls 2018-10-29 10:37:46 EDT
Mailing list reports problems with the date editor refusing to set yesterday for UK users. Since BST ended yesterday the problem seems not to be fixed after all.
Comment 5 John Ralls 2018-11-02 13:49:25 EDT
The first try dealt with only the struct tm case. The other GncDateTime constructor, GncDateTime(GncDate&, GncDateTime::DayPart) was at fault in the case reported on the mailing list. That's fixed with 0e72361.

Note You need to log in before you can comment on or make changes to this bug.