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

paule11

  • Newbie
  • *
  • Posts: 3
AM/PM or 24 hour time-format in replies
« on: August 04, 2015, 12:39:53 am »
hello everybody,

sorry to bother you with this question - I tried finding a solution in this forum and via websearch but wasn't lucky.
If you are in a hurry, only read the bold parts.

I'm using the german pro Version (1.5.7.29).
When I reply with the original mail quoted Aqua Mail writes the time of the original mail in a somewhat strange format (bold is to emphasize and not coming from the app), eg.  "Am 3. August 2015 11:13:23 nachm. schrieb...".
Unfortunately I wasn't able to set Aqua Mail to use 24-hour mode there.
What I would like to achieve is that it reads "Am 3. August 2015 (um) 23:13:23 schrieb..."
Both reply-formats "Thunderbird/Gmail" and "Outlook" do use am/pm and not 24h-mode.

Question:
How can I set Aqua Mail to use 24h-mode in the "header-section" of the quoted mail when replying?

Thanks a lot!!
Paule

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: AM/PM or 24 hour time-format in replies
« Reply #1 on: August 04, 2015, 08:13:33 am »
Hi Paule,

There is no special setting in AquaMail.
However, you can change this option in Android system settings itself:
Go to the section "System / Datum &  Uhrzeit [Date & time] " > enable "24-Stunden Format [Use 24-hour format]". If it is already enabled, then disable / enable this option. That should be solve your issue.

Regards
Mikeone
« Last Edit: August 04, 2015, 06:30:49 pm by mikeone »

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: AM/PM or 24 hour time-format in replies
« Reply #2 on: August 04, 2015, 12:59:04 pm »
I believe this is relatively "easy to add" feature for Kostya.
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: AM/PM or 24 hour time-format in replies
« Reply #3 on: August 04, 2015, 06:27:29 pm »
I assume that's not really needed in AquaMail, since this option is sufficient controlled at Android's system level.

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: AM/PM or 24 hour time-format in replies
« Reply #4 on: August 04, 2015, 07:01:22 pm »
But I suppose he wants to use 12 hour mode in the whole system, just in AquaMail 24-hr mode for replies.
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 #5 on: August 04, 2015, 08:36:30 pm »
Quote
But I suppose he wants to use 12 hour mode in the whole system, just in AquaMail 24-hr mode for replies

Then that's the time to decide, which format he / she really likes best.
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 #6 on: August 04, 2015, 08:50:47 pm »
I've seen a very minor bug in Aqua Mail that after a device restart the time format in replies defaults to 12h, even if the system default is 24h. The workaround is to switch the time format to 12h and back to 24h in the Android settings. Didn't find it worth reporting. Maybe it matches the issue the TO sees here.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AM/PM or 24 hour time-format in replies
« Reply #7 on: August 04, 2015, 08:59:08 pm »
Re: "12 / 24h bug" -- just checked the code, I use a standard Android function to format the time, and it's actually called every time (e.g. the value isn't cached). So maybe it's a minor bug in Android itself..
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 #8 on: August 04, 2015, 09:21:56 pm »
Re: "12 / 24h bug" -- just checked the code, I use a standard Android function to format the time, and it's actually called every time (e.g. the value isn't cached). So maybe it's a minor bug in Android itself..

It was an Android 5.0.x bug then. If I terminate Aqua Mail Pro on my Xperia Z3 compact with Android 5.0.2 and launch the app again, the time format defaults to 12h when replying despite 24h set system-wide. But I can't reproduce this on my Nexus 7 with the latest 5.1.1 anymore (but I definitely experienced the issue there as well a while ago). So it might have been already fixed by Google.

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: AM/PM or 24 hour time-format in replies
« Reply #9 on: August 04, 2015, 09:22:47 pm »
I've seen a very minor bug in Aqua Mail that after a device restart the time format in replies defaults to 12h, even if the system default is 24h. The workaround is to switch the time format to 12h and back to 24h in the Android settings. Didn't find it worth reporting. Maybe it matches the issue the TO sees here.
Yes,  I can confirm this behavior... unfortunately also with latest 5.1.1 ...and how Kostya explained it seems to be a bug in Android itself.
Therefore the only workaround to fix this issue is as described by you (... and mentioned in my previous post: http://www.aqua-mail.com/forum/index.php?topic=3815.msg19585#msg19585)
« Last Edit: August 04, 2015, 09:25:34 pm by mikeone »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
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 #11 on: August 04, 2015, 09:55:40 pm »
I can confirm this behavior... unfortunately also with latest 5.1.1

It was an error on my side, sorry. I forgot that my Xperia Z3 compact had been updated to 5.1.1 yesterday :-[
Still wondering why I couldn't reproduce it on my Nexus.

@Kostya:

Thank you for finding the bug report.

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: AM/PM or 24 hour time-format in replies
« Reply #12 on: August 05, 2015, 12:58:45 pm »
Quote
But I suppose he wants to use 12 hour mode in the whole system, just in AquaMail 24-hr mode for replies

Then that's the time to decide, which format he / she really likes best.

Just use h instead of H in your SimpleDateFormat (if that option is enabled)
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

paule11

  • Newbie
  • *
  • Posts: 3
Re: AM/PM or 24 hour time-format in replies
« Reply #13 on: August 05, 2015, 04:08:59 pm »
thank you everybody for explaining what's going on!!
And Kostya, thank you for getting involved right away!

I tried switching back and forth and it works for some time. However after a while AquaMail shows the 12h-format again.
Phone is a Galaxy S4 running 5.1.1 (OptimizedCM-12.1-20150725-jflte / LMY48G / Firmware XXUAMDE) from a thread over at xda-developers (title: [JDCTeam][5.1.1][25 July] Optimized CyanogenMod 12.1 builds)
However, since I installed xposed I can't hope for support from their side.

Quote
But I suppose he wants to use 12 hour mode in the whole system, just in AquaMail 24-hr mode for replies

Then that's the time to decide, which format he / she really likes best.

Just use h instead of H in your SimpleDateFormat (if that option is enabled)

Didn't mean to confuse - my phone is and was set to 24h and I want to keep it that way.

Kostya, is there anything you can do about it (use h instead of H)?
Or do we have to wait for google (maybe as well custom rom creators?) to fix it?



Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AM/PM or 24 hour time-format in replies
« Reply #14 on: August 05, 2015, 04:30:39 pm »
I don't use SimpleDateFormat.

My code is:

Quote
DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM).format(new Date(when));

http://developer.android.com/reference/java/text/DateFormat.html#getDateTimeInstance(int, int)

Quote
Returns a DateFormat instance for formatting and parsing of both dates and time values in the manner appropriate for the user's default locale.

Since it does consider the user setting fof 12/24 at least most of the time -- then clearly it's intended to do so.

That it doesn't do this all the time -- clearly is a bug in this function, since my code calls it with identical parameters every time and doesn't cache the value.

See comment #3 in the bug report I've linked above.
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/