interpreting times just after midnight or noon

Hi, all.

I know, when a date string is pasted into TBX’s date type attribute, TBX will appropriately convert it.

tbx1

(pasted string)

tbx2

(converted date)

But in the cases that digit 0 or 12 is used at hour position, the conversion may not be correct. For example,

tbx3

(pasted string)

tbx4

(converted date)

“12:57 AM (12-hour clock)” means “0:57 (24-hour clock)”, but it converted to “12:57 (24-hour clock)”.

As far as my trial in v8.9.2 on OSX 10.13.6, TBX will interpret hour figures as below.

pasted string
(12-hour clock)
expected result
(24-hour clock)
the result in TBX
(24-hour clock)
12:57 AM 0:57 12:57
0:57 AM 0:57 0:57
12:57 PM 12:57 12:57
0:57 PM 12:57 0:57

Although “12:57 AM/PM” format is used in Twitter or other situation widely, TBX’s conversion seem to be inconsistent.

I can’t replicate this in 8.9.2 on macOS 14.14.6, noting we are on different OS major versions. For me, the AM/PM times coerce correctly to the 24-hour clock format. I say this as Tinderbox looks at the user’s OS locale for date/time formatting, so the issue might be something in the way you’ve got your OS date settings configured. If it was v8.9.2 generally, I’d expect to see the errors you report, but i don’t.

Incidentally, I’m not sure this is true:

I think you mean common in the USA. In reality, for both date and time formats, the US is actually an global outlier:

But there’s no single right/wrong here as there isn’t a single global format convention for time & dates in general (vs official) use. This worldwide variation is why Tinderbox uses your OS locale, as this is generally most likely to match your expectation. Most of us are used to using our local conventions and get confused by unfamiliar ones.

Time conversions depend on your locale settings, which you will find in System Preferences : Language and Region : Advanced.

Even further complicating things, Tinderbox does intervene to catch some usages that macOS thinks to be ill-formed but that aren’t uncommon — and, for better or worse — Tinderbox in these cases tends to assume American idioms. But I don’t think that’s what happens here.

To make things more complicated, details of the default settings change from one version of macOS to the next, and of course you might not be using the default settings.

Thank you for your verifying.

Yes, I’m a Japanese user living in Japan. My OS’s locate is Japan and “Language & Region” and “Date-Time” preferences also are set to Japanese.

For confirmation, I made a new user account whose language is English.
In the environment, the time conversion is correct.

So, my problem is likely due to my own environment.

But, exploring the true condition leading this problem would take many time and effort, or, if my system setting related to locate be set to English, other problems could occur.

A practical and fast resolution may be, therefore, a special processing the string being misinterpreted with Applescript or other scripting. I will do so.