Adium

Ticket #8989 (closed defect: worksforme)

Opened 4 months ago

Last modified 2 months ago

Adium 1.2.1 sometimes use 12h time format instead of 24h

Reported by: PRe Assigned to: iheartny
Priority: normal Milestone: Adium X 1.2.4
Component: Adium UI Version: 1.2.4b1
Severity: regression Keywords:
Cc: Patch: None
Pending: 0

Description

Please look at the screenshot. In the adium window on the rigth, we could see that adium timestamp sometimes display 7:20 instead of 19:20. On the left of the picture, you have the real history file, with good time display.

For information: I'm using french version of Adium and of Mac Os X 10.5.1

Attachments

Image 2.png (63.6 kB) - added by PRe on 01/20/2008 08:05:34 AM.
screenshot
24h time.png (114.7 kB) - added by beej on 02/13/2008 02:40:56 PM.
24h no workie :(
yyy.png (56.4 kB) - added by Harry_The_Bustard on 02/19/2008 05:33:09 PM.
still busted with 1.2.3.png (165.2 kB) - added by beej on 02/26/2008 04:22:03 PM.
advanced prefs.png (63.1 kB) - added by beej on 03/07/2008 01:52:01 PM.
adium24h.png (58.0 kB) - added by jas8522 on 03/12/2008 05:29:32 PM.
24h format works great!
medium length preference.png (84.3 kB) - added by jas8522 on 03/12/2008 05:30:08 PM.
Setting the Medium length format is important - that is the one that Adium uses.

Change History

01/20/2008 08:05:34 AM changed by PRe

  • attachment Image 2.png added.

screenshot

01/21/2008 07:00:53 PM changed by jas8522

  • owner changed from nobody to iheartny.
  • milestone set to Needs dev review.

Interesting... it's by design to be like that in the status message, but in actual message titles, I believe that time should follow the set format in Adium prefs.

iheartny: since you're still actively working on Stockholm, perhaps you could take a look at this?

01/25/2008 09:22:54 AM changed by Harry_The_Bustard

The date and time in Message Titles are fine - matching what's in the Apple Menu Bar subject to the "Time Stamp Format" in the "Advanced / Messages / Message Display" Preference. However, the design (mentioned) of the Status message - i.e. the time shown to the left when events such as contacts go idle et cetera - is a bad one as it is inconsistent in that it differs from the Message Titles one. It should match that (and so that used in the Apple Menu Bar) subject to the Preference mentioned above - hence where a 24 hour clock is in use, with or without seconds, that format should be used.

01/28/2008 09:33:44 PM changed by jas8522

  • status changed from new to closed.
  • resolution set to wontfix.

Harry_The_Bustard, if you'd like to fix that, go right ahead, but it's not as easy as you would think since then both the time and the status text could be of varying size... at the moment if you make it display any format of time then they will simply get clipped which looks considerably worse than a slight inconsistency.

01/29/2008 06:10:19 AM changed by Harry_The_Bustard

My programming skill lay only in databases - and non-GUI at that - so I'm afraid I can't help here. I'm disappointed that the 24 hour clock format - without seconds at least - cannot be accommodated given that 10:00 through to 12:59 appear without being clipped. Surely this demands further consideration.

01/29/2008 02:32:12 PM changed by evands

  • status changed from closed to reopened.
  • resolution deleted.

jas, I don't understand your explanation. In the picture shown, the outgoing time is shown in 12 hour time while in the incoming time is shown in 24 hour time... and the time on-hover is shown in 12 hour time.

01/29/2008 02:37:05 PM changed by evands

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [22511]) Don't ever force 12 hour time. Fixes display of 24 hour time in Stockholm. Fixes #8989

01/29/2008 02:37:30 PM changed by evands

  • milestone changed from Needs dev review to Adium X 1.2.2.

01/29/2008 02:38:49 PM changed by evands

(In [22512]) Merged [22511]: Don't ever force 12 hour time. Fixes display of 24 hour time in Stockholm. Fixes #8989

(follow-up: ↓ 10 ) 01/29/2008 03:14:42 PM changed by iheartny

Fixed? If we going to use %time% then the time stamp will be too large for the design which only supports 4 characters plus colon XX:XX.

(in reply to: ↑ 9 ) 01/29/2008 03:26:49 PM changed by evands

Replying to iheartny:

Fixed? If we going to use %time% then the time stamp will be too large for the design which only supports 4 characters plus colon XX:XX.

I don't see any part of the design which fails to account for a time string of any length. What problem do you see?

01/29/2008 04:07:35 PM changed by iheartny

the status time stamp is limited to a 39px area without a structure overhaul.

01/29/2008 05:07:43 PM changed by evands

  • status changed from closed to reopened.
  • resolution deleted.

Ah. I didn't change the status timestamp; I just fixed the incoming and outgoing messages. The status timestamp is still broken, then.

01/29/2008 05:53:47 PM changed by evands

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [22514]) Added %shortTime% keyword, which uses the localized date formatter without AM/PM or seconds, and made use of it in Stockholm for status message timestamps. Fixes #8989

01/30/2008 01:31:46 PM changed by iheartny

Thats perfect! I may need to make one change to make sure there is no overlap between the User Name and the time stamp in the message header.

02/13/2008 02:40:56 PM changed by beej

  • attachment 24h time.png added.

24h no workie :(

02/13/2008 02:42:01 PM changed by beej

this doesn't seem to work for me with 1.2.2b1 :(

see attached screenshot.

02/19/2008 05:33:09 PM changed by Harry_The_Bustard

  • attachment yyy.png added.

02/19/2008 05:33:42 PM changed by Harry_The_Bustard

It's a step back in my view - I now seeing "19 Feb" against Status Messages where I used to see a time. (That was a 12 hour one when a 24 hour one would have been better - the original issue.) I have not changed my Menu Bar time since before Version 1.2 - in that I having a Custom setting of "day dd Month yyyy hh:mm:ss - e.g. Tue 19 February 2009 22:09:59. I tried the two alternatives of the "Advanced / Messages / Message Display / Time stamp format" Preference - one with seconds and one without - but, much as expected, neither affected this as presumably that only controls Message Titles. See the attached.

02/19/2008 09:20:39 PM changed by evands

  • status changed from closed to reopened.
  • resolution deleted.
  • severity changed from normal to regression.
  • milestone changed from Adium X 1.2.2 to Adium X 1.2.3.

(follow-up: ↓ 29 ) 02/19/2008 11:56:10 PM changed by boredzo

Note that the time format that Adium uses is not the one you set for the menu-bar clock, but the one you set in the International pane of System Preferences. You can set the menu-bar clock any way you want, and it won't affect Adium (with bug or without).

02/20/2008 04:37:11 AM changed by Harry_The_Bustard

The method I use to set the time format as mentioned above does make a difference. Here is what I do (or, rather, did) to set it so.

System Preferences -> International -> Formats

- Click on the "Customize..." option by "Dates"

- Choose "Long" from the drop-down list by "Show"

- Copy the Date shown to the Clipboard

- Click on "Cancel".

-

- Click on the "Customize..." option by "Time"

- Choose "Medium" from the drop-down list by "Show"

- Paste the Clipboard contents ahead of the Time shown

- Place a space between the Date and Time elements

- Click on "OK".

Note that he "Region" at the top of the pane is set to "Custom" by the system.

Adium shows "19 Feb" against Status Messages as per my attachment. It also shows a "Time stamp format" of "19 February 2008 22:09" in Preferences / Advanced / Messages / Message Display with another option to show it with seconds. This, incidentally, illustrates another bug in that the chosen value is truncated on the right. I'll log this if no-one else does by the time this one is closed again.

If one reverts to a standard Menu Bar display of "Tue 22:09" by setting Region in "System Preferences -> International -> Formats" to, say, "United Kingdom", the time element of that appears in the Status Messages exactly as shown - which is what's needed.

So, the usage of custom dates is presumably the root cause of the problem.

02/23/2008 12:19:20 PM changed by PRe

For me, the problem is now solved in Adium 1.2.2: The time format seems to be always correct now (I was using French default time format).

Thanks a lot for your support! :)

02/23/2008 07:45:11 PM changed by evands

  • status changed from reopened to closed.
  • resolution set to fixed.
  • milestone changed from Adium X 1.2.4 to Adium X 1.2.2.

Harry_The_Bustard, if you put date information in your time format, it's your own fault that you see dates when you want to see times. There's nothing we can do about insane settings.

02/23/2008 10:31:47 PM changed by Harry_The_Bustard

I see nothing insane about wanting to see the day, date and time in the Menu Bar. If there is a way of doing this then please let me and others know here. Whether there is or there isn't it beggars belief that the development team can't cater for such. All you have to do is get the time from the system and display it in hh:mm format - child's play by the sound of it - so the method you are using must be insane.

02/23/2008 10:35:43 PM changed by Harry_The_Bustard

r/If there is a way/If there is a better way/

02/24/2008 06:50:00 AM changed by Harry_The_Bustard

Incidentally, the "insane" method I used to set the time (and day and date) in the Menu Bar was given in response to a letter asking for such in MacUser - a leading UK Apple magazine - sometime last year. It means one doesn't have to click on the time or invoke Dashboard with a clock on it or have iCal in the Dock or be running Entourage with the calendar page visible et cetera to see the day and date. I like the method as - and so do the people that I've shown it to - as it makes life that little bit easier.

02/24/2008 07:43:09 AM changed by evands

hh:mm isn't the localized time format, though it might be. We say to the system, "Please give us the short localized time format string." If that return value has been forced to include the date, that's not our fault.

I use ObjectPark's excellent MenuCalendarClock to have access to the date, time, and my iCal events and todos from the menu bar. This inexpensive shareware is a better solution than confusing any program which expects sanity from the localized time-only format string.

02/24/2008 09:13:27 AM changed by Harry_The_Bustard

Mac OS X, like Apple, is not perfect - clearly illustrated here by the awkward means of setting up a Menu Bar as one would wish. You would think that they would provide an option on the "Clock" page of the System Preference "System / Date & Time" to display the date as well as the time and the (abbreviated) day of the week. (It's also clearly wrong to have the option "Show the date and time" at the top of that when the date is not controllable via it.) I am not, as I have mentioned before, at all familiar with the language used in Adium but the one I am skilled in (which is embedded in an obscure RDBMS) allows the system date to be obtained and displayed in more forms than one can shake a stick at. It is surely possible to do most anything with dates and times in any language - for example identifying an HH:MM pattern in a string. So, if you can't get that simple string directly (which I find odd) then you should perform an extraction of it after carrying out a pattern match. The degree of coding for such should be minimal - as it is in the language I know - and I would be amazed if there's not a library routine for doing just that somewhere. (If not then perhaps one needs writing.) I'll look at the suggestion of using something other than a System Preference for the day and date in my Menu Bar but even if I opted for that I would hope that someone on your development team can achieve what's needed as suggested. If not then perhaps I'll have to learn the language and provide the solution myself.

02/24/2008 11:18:18 AM changed by evands

Attempting to extract hh:mm from the localized format string defeats the purpose of it being specific to the locale. My country might display minutes first or use a different character to separate hours and minutes.

It would be better to modify the format used by the menu clock directly. I suspect you could add the NSTimeFormatString you want to its preferences (rather than to the global preferences) to get the desired effect.

02/25/2008 05:18:59 AM changed by Harry_The_Bustard

And they say they can do anything with computers these days. Sigh. I give up.

(in reply to: ↑ 18 ) 02/25/2008 02:45:27 PM changed by beej

Replying to boredzo:

Note that the time format that Adium uses is not the one you set for the menu-bar clock, but the one you set in the International pane of System Preferences.

thanks! that was indeed where i was confused.

FYI: i filed rdar://5763199 (having two places to set the time format is confusing) with apple.

02/25/2008 08:20:55 PM changed by beej

arg. now that i've correctly set the system-wide time format, times show up in 24-hr format in programs like iCal, but still no love from Adium :( using the Stockholm Message Style that comes with 1.2.3, messages are currently being stamped, eg, 8:20:45 instead of 20:20:45.

02/26/2008 04:22:03 PM changed by beej

  • attachment still busted with 1.2.3.png added.

02/26/2008 04:39:37 PM changed by Catfish_Man

  • status changed from closed to reopened.
  • resolution deleted.

02/26/2008 05:22:13 PM changed by jas8522

beej: do you have an override set in Advanced Preferences > Messages?

03/05/2008 05:35:32 AM changed by Robby

  • milestone changed from Adium X 1.2.2 to Adium X 1.2.x.

This shouldn't remain in the 1.2.2 milestone if it's still an issue.

03/05/2008 06:57:44 AM changed by jas8522

  • pending set to 1.
  • milestone changed from Adium X 1.2.x to Needs feedback from users.

Actually it needs feedback... my question was:

beej: do you have an override set in Advanced Preferences > Messages?

As this seems to work fine for everyone else.

03/07/2008 01:51:13 PM changed by beej

hi, jas8522.

it looks to me like i once configured an override, but disabled it. see attached.

03/07/2008 01:52:01 PM changed by beej

  • attachment advanced prefs.png added.

03/11/2008 11:29:44 AM changed by jas8522

  • version changed from 1.2.1 to 1.2.4b1.
  • pending deleted.
  • milestone changed from Needs feedback from users to Adium X 1.2.5.

03/12/2008 05:28:25 PM changed by jas8522

I finally got around to testing this by setting the time in the International prefs. The results show that it works without issue. See my screenshot.

When you are configuring the 24h time format, you need to be sure to set the "Medium" one - as that is the one that Adium grabs. Technically you should be setting all of them anyway - if that is the format you like.

See the second screenshot to understand what I mean.

03/12/2008 05:29:32 PM changed by jas8522

  • attachment adium24h.png added.

24h format works great!

03/12/2008 05:30:08 PM changed by jas8522

  • attachment medium length preference.png added.

Setting the Medium length format is important - that is the one that Adium uses.

03/12/2008 06:13:39 PM changed by Harry_The_Bustard

I'm pleased to see a solution is on its way - especially as I thought the gauntlet I'd thrown down would not be picked up up after it had been stamped on. Still, I'll reserve judgement and look forward to seeing the outcome on the relevant (hopefully next) release. (I'm sorry to sound cynical only I've worked in commercial software development for twenty years and seen bugs come and go and come back again - though never mine of course!) By way of a side-note it would be handy if Apple were to illustrate where the Short, Medium, Long and Full time formats are used - at least in their software. (We now know which one Adium uses - though the question "Why the 'Medium' one?" arises.) "Choosing date, time, and number formats" in the Help system has a stab at it but it's still rather lacking. Of course I realise this isn't a forum so I won't expect answers here.

03/12/2008 06:54:28 PM changed by jas8522

  • status changed from reopened to closed.
  • resolution set to worksforme.
  • milestone changed from Adium X 1.2.5 to Adium X 1.2.4.

According to what was discovered by beej, setting the time format in the menubar shouldn't have any effect on the time format in Adium. My findings concur - in that I changed the format to 24h in the clock settings and it did not show up as 24h in messages. It was not until I changed the 'medium' length international time format in the system prefs that the 24 hour time format showed in Adium.

As I mentioned before, there is no reason for someone to change the format of one length and not the others... you either want 24h formatting or you don't.

This has been tested with both the 1.2.4 AdiumBeta and 1.3svn.

I have confirmed this with Robbie and with a user on IRC.

Robbie's tests indicated that using a 24h locale setting resulted in Adium showing times in 24 hour format.

The user on IRC reported that once he changed all of those (short, medium, long, and full) to 24 hour it worked fine in Adium.

03/12/2008 07:06:25 PM changed by Robby

Yep, and this ticket has become quite a mess anyway. So if there's an issue left please open a new ticket and it will be looked at.