[mythtv] [mythtv-commits] mythtv commit: r18741 by nigel

Michael T. Dean mtdean at thirdcontact.com
Fri Oct 17 03:31:58 UTC 2008

On 10/16/2008 11:12 PM, mythtv at cvs.mythtv.org wrote:

>  Author: nigel
>  Date: 2008-10-17 03:12:01 +0000 (Fri, 17 Oct 2008)
>  New Revision: 18741
>  Changeset: http://cvs.mythtv.org/trac/changeset/18741
>  Modified:
>  trunk/mythtv/libs/libmyth/util.cpp
>  Log:
>  Remove #includes that compat.h already includes, comments on Windows
>  TimeZones

Regarding the comment on Windows time zones:

// Sadly, Windows zone names are different to the (probably Unix)
// backend's names - "AUS Eastern Standard Time" vs "Australia/Sydney".
// Translation is not worthwhile. Leave it as UNDEF to check the offset.

you're probably right about translation not being worthwhile; however, 
if some enterprising Windows user wants to convert the code to Qt/C++, 
there's already C code in OpenJava (also GPL2 license).

 From my comment at http://svn.mythtv.org/trac/ticket/5319#comment:1 :
This patch does not provide any Windows functionality for detecting the 
time zone ID (even the localtime_r() functionality is #ifndef'ed for 
Windows as localtime_r() doesn't exist on mingw). In order for Windows 
hosts to take advantage of the (future) functionality which requires 
QUERY_TIME_ZONE (i.e. identifying misconfigured time zones or allowing 
MythWeb to adjust when its host's time zone is different from that 
specified on the master backend), Windows-specific functionality will be 
required. The OpenJDK files jdk/src/share/native/java/util/TimeZone.c ( 
getPlatformTimeZoneID() ) and 
jdk/src/windows/native/java/util/TimeZone_md.c ( findJavaTZ_md() and 
getWinTimeZone() ) provide a good example approach. Basically, though, 
the Windows API's are used to determine the Windows time zone settings 
and then the Windows rules must be mapped to the appropriate zoneinfo 
database ID.

Currently on Windows, the time zone ID will be "UNDEF" and only the UTC 
offset and current time will be provided.


More information about the mythtv-dev mailing list