Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Inputted dates back to the previous day (Read 837 times)
Komori Kou
Full Member
*
Offline



Posts: 18

Inputted dates back to the previous day
Feb 1st, 2016, 4:14pm
 
TinderboxSix 6.4.0
OSX 10.9.4

I have noticed a date inputted into date type attribute runs back to the previous day if the date is before year 1888.

I am a Japanese, so the date format I use is Japanese style.
yyyy/mm/dd

When 1887/12/31 is inputted, its result is 1887/12/30.
1790/1/1 runs back to 1789/12/31.
[result (1) and result (2)]


The dates after 1888/1/1 are not affected.
[result (3)]



I think this bug is subtle, but serious.
Back to top
 
« Last Edit: Feb 01st, 2016, 4:15pm by Komori Kou »  
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Inputted dates back to the previous day
Reply #1 - Feb 2nd, 2016, 11:03am
 
This is a known issue in the Macintosh date conversion routines, and apparently relates to the introduction of time zones in 1888. We'll launch a new query regarding the desired standard behavior.
Back to top
 
 
WWW   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Inputted dates back to the previous day
Reply #2 - Feb 3rd, 2016, 12:34pm
 
More detail on what I believe is happening.

a) Remember that all Tinderbox dates have a time, too -- they represent a specific point in time.

b) When you enter a date, we assume you mean the date and time in your local time zone, using your local calendar.  The calendar matters, for example, because different countries changed from the Julian to the Gregorian calendar in different years.  Similarly, in medieval and early modern England, the year began in March, not January, and so what in England was "Jan 15, 1602" was already 1603 in Paris.

c) When you donít specify the time of day, Tinderbox uses the current clock time. If I type "February 3, 2016" Tinderbox will supply "12:25 PM EST" as the current time of day.

d) Time zones didn't exist before the 19th century.

e) What I believe this means is that, for historical dates, Tinderbox converts your current time to GMT, corrects the historical date, and then localizes the historical date for your system.  Normally, the latter adjusts the time to your localeís time zone. But before time zones existed, that correction canít be applied.  The result may be that, for nine hours of the day, Tinderbox will give you the correct historical dates in Japan, and for fifteen hours a day, it will be off by one day (or, to be precise, 9 hours).

f) My head hurts.

Back to top
 
 
WWW   IP Logged
Derek Van Ittersum
Full Member
*
Offline



Posts: 168

Re: Inputted dates back to the previous day
Reply #3 - Feb 4th, 2016, 6:17am
 
What are the downsides to using midnight (12:00 AM) as the default time when no time is explicitly entered? I dimly recall this being discussed before, but can no longer remember. For my purposes at least, I think this would be useful, and I imagine for historical dates this far back, time at hours/min level is not necessary / known.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Inputted dates back to the previous day
Reply #4 - Feb 4th, 2016, 6:47am
 
As I recall, the suggestion to which @Derek refers was to allow an option (preference? doc setting? per attribute?) to set a default time for Date/time attributes to be used where no explicit time was provided by the user. As such this would preserve the status quo and allow those with the need to avoid unintended time related surprises.

At a tangent, if one needs to record dates and don't need to do date arithmetic or use timeline view, there is something to be said for using String attributes. Thus a to-do item my change so a Date type is a good choice. But, the date of the Battle of Hastings isn't going to change so a String will do. Indeed, historical dates may be partial: we may know only the decade or month+year of the event so using a formal Date-type isn't ideal. There's no hard and fast ruleÖit depends of your task/data.  I would say that in a historical context, String is better than Number type as Tinderbox will display decimals for numbers in places like KA or column view. If you make a $YearDate user attribute with a value of '1066', a String-type attribute will display as '1066' but a Number-type will display '1066.'; the latter is likely not what you want. As MB's last post shows, dates are surprisingly complex - even within a single locale.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print