[asterisk-bugs] [Asterisk 0014333]: [patch] add option to configure locale for date/time string construction
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Feb 2 05:59:15 CST 2009
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14333
======================================================================
Reported By: klaus3000
Assigned To: Corydon76
======================================================================
Project: Asterisk
Issue ID: 14333
Category: Applications/app_voicemail/NewFeature
Reproducibility: have not tried
Severity: feature
Priority: normal
Status: feedback
Asterisk Version: SVN
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!): 169203
Request Review:
======================================================================
Date Submitted: 2009-01-26 07:35 CST
Last Modified: 2009-02-02 05:59 CST
======================================================================
Summary: [patch] add option to configure locale for date/time
string construction
Description:
Hi!
When voicemail sends emails it constructs the date/time when the
voicemessage was received. This patch allows to configure the locale for
generation of the string.
locale=de_AT.UTF-8 results in
"Montag, 26 Jänner 2009" instead of "Monday, 26 January 2009".
This could also be achieved setting the default OS locale - but this would
also change the locale of all other date/time strings in Asterisk
(logmesage, CDRs...) which can be bad.
======================================================================
----------------------------------------------------------------------
(0099211) klaus3000 (reporter) - 2009-02-02 05:59
http://bugs.digium.com/view.php?id=14333#c99211
----------------------------------------------------------------------
Not sure what you mean with linked list. I would write an
ast_strftime_locale(....., locale_t locale) function which sets/resets the
locale before/after strftime.
The locale will be created by the module (e.g. app_voicemail) during
module load.
So, what for is the linked list?
Further, I have not fully understand the concept of freeing the memory
(bad documentation). resetting the locale with uselocale(LC_GLOBAL_LOCALE)
returns a locale which holds the previous locale. My tests showed that
uselocale points to the same locale multiple times - thus freeing this
memory may cause problem when it is freed in mutliple modules.
Issue History
Date Modified Username Field Change
======================================================================
2009-02-02 05:59 klaus3000 Note Added: 0099211
======================================================================
More information about the asterisk-bugs
mailing list