Skip to content

Commit

Permalink
xx
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Apr 26, 2024
1 parent 232317f commit 724659a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions winpr/libwinpr/timezone/utils/tzextract.cs
Expand Up @@ -4,16 +4,16 @@ internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine("/* Automatically generated by tzextract */");
Console.WriteLine("");
Console.WriteLine("#include \"TimeZoneNameMap.h\"");
Console.WriteLine("");
Console.WriteLine("const TimeZoneNameMapEntry TimeZoneNameMap[] ={");
System.Console.WriteLine("/* Automatically generated by tzextract */");
System.Console.WriteLine("");
System.Console.WriteLine("#include \"TimeZoneNameMap.h\"");
System.Console.WriteLine("");
System.Console.WriteLine("const TimeZoneNameMapEntry TimeZoneNameMap[] ={");

foreach (TimeZoneInfo tz in TimeZoneInfo.GetSystemTimeZones())
foreach (System.TimeZoneInfo tz in System.TimeZoneInfo.GetSystemTimeZones())
{
string iana;
TimeZoneInfo.TryConvertWindowsIdToIanaId(tz.Id, out iana);
System.TimeZoneInfo.TryConvertWindowsIdToIanaId(tz.Id, out iana);

StringBuilder sb = new StringBuilder();
sb.Append("{ \"");
Expand All @@ -27,12 +27,12 @@ private static void Main(string[] args)
sb.Append("\", \"");
sb.Append(iana);
sb.Append("\" },");
Console.WriteLine(sb.ToString());
System.Console.WriteLine(sb.ToString());
}

Console.WriteLine("};");
Console.WriteLine("");
Console.WriteLine("const size_t TimeZoneNameMapSize = ARRAYSIZE(TimeZoneNameMap);");
Console.WriteLine("");
System.Console.WriteLine("};");
System.Console.WriteLine("");
System.Console.WriteLine("const size_t TimeZoneNameMapSize = ARRAYSIZE(TimeZoneNameMap);");
System.Console.WriteLine("");
}
}

0 comments on commit 724659a

Please sign in to comment.