Author Topic: AM/PM or 24 hour time-format in replies  (Read 23462 times)

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AM/PM or 24 hour time-format in replies
« Reply #15 on: August 05, 2015, 04:53:21 pm »
I just tested the system level setting for "use 24 hour format" on two devices: Sony Z2 with 5.1 and Nexus 5 with M Preview.

The message header (when replying / forwarding) did use the current setting, I've tried changing back and forth too.

So there must be a subtle bug maybe having to do with Android boot-up (I mean in Android code, not AquaMail).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: AM/PM or 24 hour time-format in replies
« Reply #16 on: August 05, 2015, 06:09:06 pm »
But Paule wants option to make it independent from system setting. Talks about Android and its bug related to time mose should not be in this thread.
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AM/PM or 24 hour time-format in replies
« Reply #17 on: August 05, 2015, 06:22:01 pm »
But I don't want to add this option -- the system level setting "should be enough for everyone".

Every new setting:

- Makes the code more complex even if it's just a little bit, it adds

- Adds possibility for misuse ("why are times formatted as am/pm if my system level setting is use 24 hours")

- This then becomes a support issue

- For a small feature like that, I can easily forget it's even there, and so it becomes a support issue again

- Translations

Sorry, I fail to see why the system level setting is not enough.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

disposable_bag

  • Newbie
  • *
  • Posts: 13
Re: AM/PM or 24 hour time-format in replies
« Reply #18 on: August 05, 2015, 07:33:40 pm »
But Paule wants option to make it independent from system setting. Talks about Android and its bug related to time mose should not be in this thread.

Unless I got it really wrong, the TO never asked explicitly for an independent switch within Aqua Mail but wanted it to follow the system-wide setting, which was 24h in his case. This is precisely what the Android bug report is about.

P.S.: The issue remains elusive on my Nexus 7, even after a full restart, with background sync in AM on as well as off.

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: AM/PM or 24 hour time-format in replies
« Reply #19 on: August 05, 2015, 10:58:15 pm »

Unless I got it really wrong, the TO never asked explicitly for an independent switch within Aqua Mail but wanted it to follow the system-wide setting, which was 24h in his case. This is precisely what the Android bug report is about.
Yes,  you are correct.
Quote
P.S.: The issue remains elusive on my Nexus 7, even after a full restart, with background sync in AM on as well as off.
Currently I can't reproduce this issue on my Xperia Z3 with Android 5.1.1 any more. It seems to be fixed after switching 12/24-format back and forth in Android system settings (once only right now). But maybe it will come back again...

... or maybe (finally) fixed by Kostya with build 1.5.9.5 yesterday:
[that's what I believe > Android's system code fixed by telepathy 8)]

8332 f1164266f2e9 2015-08-04 21:28 +0300 kmansoft Set am/pm when setting time

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AM/PM or 24 hour time-format in replies
« Reply #20 on: August 05, 2015, 11:23:46 pm »
"... or maybe (finally) fixed by Kostya with build 1.5.9.5 yesterday:
[that's what I believe > Android's system code fixed by telepathy 8)]

8332 f1164266f2e9 2015-08-04 21:28 +0300 kmansoft Set am/pm when setting time
"

Nope, that one is for time picker in the "Send later.." dialog.

The "am" and "pm" buttons.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: AM/PM or 24 hour time-format in replies
« Reply #21 on: August 05, 2015, 11:50:16 pm »
... ah, okay.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AM/PM or 24 hour time-format in replies
« Reply #22 on: August 06, 2015, 01:14:55 am »
One other thing:

I've done some tests and there is a different formatting function which observes the system level "use 24 hour format" setting (haven't tested with rebooting the phone, though).

However:

On a phone that is set to Russian language, it's applied too.

On this phone, I happen to have that setting "off" -- so it comes out as "2:12 pm".

But we don't use am/pm in Russia, so "2 pm" is just "whoa, what is that?"

[ Or actually, we do but only when speaking, not in writing, and there is no shorthand, we say "8 in the morning" or "2 in the day" or "9 in the evening"  ]

So let's say I make the change and some number of Russian users start seeing am/pm in their replies. This is wrong.

Some of them will contact me (unhappy about the change), some won't, and decide that the app is "broken".

Do I make a special case for Russian, based on the locale == "ru"?

Ok, what if someone from Russia actually wants to use the 12 hour am/pm format, a personal preference?

Do I now need to add yet another setting ("override system level setting")?

Will the users who think that "the app is broken" be able to find it without my help?

Is Russia the only country where there is no 12 hour am/pm format?

If not, what are the others, where do I get the full list?

---

To summarize, something that looks like a really trivial change, may turn out to be very complicated if you consider the consequences.

In this respect, the "bigger" features (like the recent message view changes) are often easier.
« Last Edit: August 06, 2015, 01:20:23 am by Kostya Vasilyev, Aqua Mail »
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: AM/PM or 24 hour time-format in replies
« Reply #23 on: August 06, 2015, 07:49:38 am »
Here in Slovakia we have pretty much same system. The only thing which can help is make setting "Hours mode" and pick AM/PM or 24 hr mode.

Or:
Can you manually format time (by code ofc) to 12/24 hr mode? And then check if 24 hr mode enabled in system and use new formatted time as workaround on LP.
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

disposable_bag

  • Newbie
  • *
  • Posts: 13
Re: AM/PM or 24 hour time-format in replies
« Reply #24 on: August 06, 2015, 01:19:04 pm »
I've done some tests and there is a different formatting function which observes the system level "use 24 hour format" setting (haven't tested with rebooting the phone, though).

However:

On a phone that is set to Russian language, it's applied too.

On this phone, I happen to have that setting "off" -- so it comes out as "2:12 pm".

But we don't use am/pm in Russia, so "2 pm" is just "whoa, what is that?"

[ Or actually, we do but only when speaking, not in writing, and there is no shorthand, we say "8 in the morning" or "2 in the day" or "9 in the evening"  ]

This is very much like in German, and even saying "um 11:13:23 nachmittags" would be awfully wrong (spoken "um 11 Uhr 13 abends" would have been correct). Actually, I think that the mere idea to offer a 12h time format in the Android settings for the German locale is completely bogus. Neither Linux with GNOME nor Windows has such an option.

Quote
Do I make a special case for Russian, based on the locale == "ru"?

I tried to understand starting from

Code: [Select] [nofollow]
lxr.mozilla.org/comm-central/search?string=mailnews.reply_header_authorwroteondate
(I may not post URLs, maybe it will work this way) how the big guys are treating the time and date format. While I've failed on that, it does seem to me that it is a) locale based and b) the 12h mode exists only for the Calendar and on Android for the date and time picker:

Code: [Select] [nofollow]
lxr.mozilla.org/comm-central/search?string=12hour
Quote
Ok, what if someone from Russia actually wants to use the 12 hour am/pm format, a personal preference?

Do I now need to add yet another setting ("override system level setting")?

My personal favorite would be plain ISO 8601. Or a choice between ISO 8601 as default and any garbage Android returns when asked for date and time ;)

Quote
Is Russia the only country where there is no 12 hour am/pm format?

If not, what are the others, where do I get the full list?

Add at least Germany to the list.

Thanks!

paule11

  • Newbie
  • *
  • Posts: 3
Re: AM/PM or 24 hour time-format in replies
« Reply #25 on: August 06, 2015, 01:25:57 pm »
Yes, disposable_bag and Mikeone are correct - I never asked for the possibility to have an independent setting in AquaMail.
Nonetheless pyler's suggestion of having some sort of override to format the time to 24h-mode would be absolutely great!
Kostya, if it's rather easy, would you add a function that says something like "For Lollipop users with 12/24h-mode issue, please check this box, to format time according to 24h-mode". Maybe that would be self-explanatory enough for people to understand what the setting does and why it is there in the first place?
....just an idea of course. I do absolutely understand your concerns about adding such a feature!
Just asked in the xda-thread if someone encounters the same issue and if there is a fix that works (on system-level).
I think nobody expects individual apps to fix system-bugs!? (at least I don't!).


disposable_bag

  • Newbie
  • *
  • Posts: 13
Re: AM/PM or 24 hour time-format in replies
« Reply #26 on: August 06, 2015, 01:36:21 pm »
If there's room to enhancements, then
- improving message header display
- RTL "major direction" (needed for semitic languages)
- "undo" delete / archive
- etc.
should be considered as having a higher priority.

I fully agree, especially if my pet enhancement http://www.aqua-mail.com/forum/index.php?topic=3554.msg19413#msg19413 [nofollow] would get on the list ;)

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: AM/PM or 24 hour time-format in replies
« Reply #27 on: August 06, 2015, 02:44:33 pm »
But please not fix it like Google - Obselete, wont fix.  :D

getDateTimeInstance has third argument Locale object, so if everything is ok in e.g. X locale, pass X locale to this method.
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AM/PM or 24 hour time-format in replies
« Reply #28 on: August 06, 2015, 03:59:15 pm »
"Actually, I think that the mere idea to offer a 12h time format in the Android settings for the German locale is completely bogus"

This, 100%.

I was *shocked* to find that the setting is enabled (and set to "12 hrs, am/pm") on two phones set to Russian language.

"getDateTimeInstance has third argument Locale object"

I already use that one if the user enables "Force English in reply headers" (or whatever I've called it), passing in Locale.US.

"As far as 12/24 is concerned, I strongly recommend to leave the app as it is currently"

That's what I'm going to do.

Apparently my attempts to explain -- what a "can of worms" this is, or to use another expression "rathole" -- mostly failed.

Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

disposable_bag

  • Newbie
  • *
  • Posts: 13
Re: AM/PM or 24 hour time-format in replies
« Reply #29 on: August 06, 2015, 05:53:54 pm »

Quote from: Paris Geek
As far as 12/24 is concerned, I strongly recommend to leave the app as it is currently

That's what I'm going to do.

Apparently my attempts to explain -- what a "can of worms" this is, or to use another expression "rathole" -- mostly failed.

With that said, you don't feel like the unabmiguous ISO 8601 for both date and time format would be the way to keep clear of this can of worms, do you?

Maybe reimagining just "Force English in reply headers" as ISO 8601 instead of implying that English has something to do with the US locale? English is rather the modern exterritorial lingua franca, and the reason to choose English in reply headers is mostly to facilitate communication with people across different cultures who do understand the language but not necessarily the peculiar US date and time format.

This way the default behavior of Aqua Mail would not require any modifications.