[Pidgin] #15675: Log viewer: Timezone specifier's sign reversed

Pidgin trac at pidgin.im
Sat Jun 22 14:48:52 EDT 2013


#15675: Log viewer: Timezone specifier's sign reversed
-------------------------+-------------------------------------------------
 Reporter:  ecm          |      Owner:  rlaager
     Type:  defect       |     Status:  new
Milestone:               |  Component:  logging
  Version:  2.10.6       |   Keywords:  timezone tz timezone-specifier
                         |  logviewer log iso8601 datetime time
-------------------------+-------------------------------------------------
 I'm using "Pidgin 2.10.6 (libpurple 2.10.6)
 4cfe697ea3ae39a4fb3dad8e3ed1c70855901095" on a Debian 7.0 system running
 GNOME 3.4.2 with a custom locale enabled (modified by me to use some ISO
 8601 formats for datetime stamps). The only part of the latter that seems
 relevant is that it defines d_t_fmt as "%Y-%m-%d %H:%M:%S %z %a".

 According to the manual page on the date command, the %z format specifies
 the "+hhmm numeric time zone (e.g., -0400)" though it is not explicitly
 specified whether a positive value indicates a timezone ahead of UTC (to
 the east of GMT) or the other way around. However, using my locale and
 with the timezone configured as two hours ahead of UTC ("CEST"), "date
 +%z" displays "+0200" (this is independent of the locale) and "date +%c"
 contains the "+0200" part for the timezone specifier %z format in my
 d_t_fmt which is used for the %c format.

 To illustrate further: In my ~/.purple/logs/ subdirectories, one current
 example log is stored under a filename of
 "2013-06-22.193812+0200CEST.html". This is as it should be as concerns
 this bug report, with some fixed datetime stamp format that is similar to
 an ISO 8601 format, and its timezone specifier as "+0200" (as well as the
 "CEST" abbreviation).

 However, the log viewer displays the entry for the same example log with
 the datetime stamp displayed as "2013-06-22 19:38:12 -0200 Sat". Hence, it
 appears to use my locale's d_t_fmt (like "date +%c" does too) for the
 format as such, '''but the sign of the timezone specifier is reversed as
 opposed to the one expected by me'''. Because all of the numeric parts are
 the same as in the filename this timezone specifier apparently must be
 interpreted the other way around (ie negative meant as ahead of UTC) than
 what is expected by me and what incidentally would conform to numeric
 timezone specifiers as defined by ISO 8601.

 As it could be relevant, this is the case for all logs of an ICQ account.
 Some logs from earlier this year when my timezone was configured as one
 hour ahead of UTC (ie +01:00 or: "CET", our standard time) exhibit the
 same reversal of the sign; their timezone specifier in the log viewer is
 "-0100" even though the filenames contain the expected "+0100".

-- 
Ticket URL: <https://developer.pidgin.im/ticket/15675>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list