Closed
Bug 318422
Opened 20 years ago
Closed 19 years ago
Timestamp format should be more flexible
Categories
(Other Applications Graveyard :: ChatZilla, enhancement)
Other Applications Graveyard
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: lord2800, Assigned: rdmsoft)
References
Details
(Whiteboard: [cz-0.9.76])
Attachments
(1 file, 3 obsolete files)
34.63 KB,
patch
|
samuel
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Chatzilla 0.9.68.5.1 [Firefox 1.5/undefined]
The timestamp field does not have any sort of identifier for 12 hour format versus 24 hour format. The only identifier is a 24 hour format.
Reproducible: Always
Steps to Reproduce:
There is no identifier for 12 hour format at all.
Changed my mind and made this a feature enhancement instead.
Severity: trivial → enhancement
Summary: Timestamps only support 24 hour format → Timestamp format should be more flexible
Comment 2•20 years ago
|
||
I have written a javascript implementation of strftime for this purpose (before the bug was posted).
It is scheduled to be included with the next release as far as i know.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•19 years ago
|
||
this seems to have been lost somewhere along the line, so i'm attaching it.
Assignee | ||
Comment 4•19 years ago
|
||
Work in progress. This is Glen's strftime from above, plus modifications and code by James Ross to replace the CSS generated content timestamp system, plus my own code to integrate the two.
Currently log and display timestamps are separate, and both default to native formatting. I'm not sure about this, because we may want to be consistent across computers and promote date formats that everyone can read (y-m-d). There's no migration from the old prefs and I haven't thought much about what should be visible in the UI in what way.
Comments very much welcome. :)
Assignee: rginda → rdmsoft
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•19 years ago
|
||
I think this is ready for review. I've dumped native formatting and not coded migration because there are too many edge cases to work out and I assume people who customize timestamps won't mind doing it again just this once.
I haven't made big UI changes, just removed /timestamp-format and changed the pref help text. If anybody has other ideas, new bugs would probably be best.
Attachment #213994 -
Attachment is obsolete: true
Attachment #235174 -
Attachment is obsolete: true
Attachment #237538 -
Flags: review?(samuel)
Comment 6•19 years ago
|
||
Comment on attachment 237538 [details] [diff] [review]
patch v4
>+ if (ary[2] in timestr) {
>+ var tbranch = timestr[ary[2]];
Coding style. The "{" goes on the next line. (You did it for most of the code, just missed a couple of places.)
>+ if ("pad" in tbranch) {
>+ var padwith = (padwith in tbranch) ? tbranch.padwith : "0";
Again.
>+ if (!rpl) {
>+ switch (ary[2])
And here.
Attachment #237538 -
Flags: review?(samuel) → review+
Comment 7•19 years ago
|
||
Checked in with nits fixed:
Checking in mozilla/extensions/irc/js/lib/utils.js;
/cvsroot/mozilla/extensions/irc/js/lib/utils.js,v <-- utils.js
new revision: 1.66; previous revision: 1.65
done
Checking in mozilla/extensions/irc/xul/content/commands.js;
/cvsroot/mozilla/extensions/irc/xul/content/commands.js,v <-- commands.js
new revision: 1.108; previous revision: 1.107
done
Checking in mozilla/extensions/irc/xul/content/prefs.js;
/cvsroot/mozilla/extensions/irc/xul/content/prefs.js,v <-- prefs.js
new revision: 1.40; previous revision: 1.39
done
Checking in mozilla/extensions/irc/xul/content/static.js;
/cvsroot/mozilla/extensions/irc/xul/content/static.js,v <-- static.js
new revision: 1.211; previous revision: 1.210
done
Checking in mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties;
/cvsroot/mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties,v <-- chatzilla.properties
new revision: 1.119; previous revision: 1.118
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
![]() |
||
Comment 8•19 years ago
|
||
Comment on attachment 237538 [details] [diff] [review]
patch v4
>+pref.group.appearance.timestamps.help = The Format preference uses strftime replacements. For example, "%l %H:%M:%S%P" might become "Thursday 1:37:42pm".
From what I see, this example is wrong. To get the date string you have given, the format is "%A %l:%M:%S%P" if I'm reading the strftime manual correctly...
Comment 9•19 years ago
|
||
(In reply to comment #8)
> (From update of attachment 237538 [details] [diff] [review] [edit])
> >+pref.group.appearance.timestamps.help = The Format preference uses strftime replacements. For example, "%l %H:%M:%S%P" might become "Thursday 1:37:42pm".
>
> From what I see, this example is wrong. To get the date string you have given,
> the format is "%A %l:%M:%S%P" if I'm reading the strftime manual correctly...
Looking at the code, I think he's right. Robert, can you confirm that and/or poke up a patch?
Assignee | ||
Comment 10•19 years ago
|
||
Yep, exactly right. Thanks!
Attachment #244769 -
Flags: review?(silver)
Updated•19 years ago
|
Attachment #244769 -
Flags: review?(silver) → review+
Comment 11•19 years ago
|
||
Comment on attachment 244769 [details] [diff] [review]
[checked in] fix help text
Fixed:
Checking in mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties;
/cvsroot/mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties,v <-- chatzilla.properties
new revision: 1.122; previous revision: 1.121
done
Attachment #244769 -
Attachment description: fix help text → [checked in] fix help text
Attachment #244769 -
Attachment is obsolete: true
Updated•19 years ago
|
Whiteboard: [cz-0.9.76]
Updated•4 months ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•