Windows Display Name | Windows ID | Preferred Response | Moment Guess | Result | January Offset | July Offset | Notes |
---|---|---|---|---|---|---|---|
(UTC-12:00) International Date Line West | Dateline Standard Time | Etc/GMT+12 | Etc/GMT+12 | Match | -12:00 | -12:00 | |
(UTC-11:00) Coordinated Universal Time-11 | UTC-11 | Etc/GMT+11 | Pacific/Pago_Pago | Acceptable | -11:00 | -11:00 | |
(UTC-10:00) Hawaii | Hawaiian Standard Time | Pacific/Honolulu | Pacific/Honolulu | Match | -10:00 | -10:00 | |
(UTC-09:00) Alaska | Alaskan Standard Time | America/Anchorage | America/Anchorage | Match | -09:00 | -08:00 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using NodaTime; | |
using NodaTime.Text; | |
namespace ConsoleApplication10 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select id="timezone_string" name="timezone_string" aria-describedby="timezone-description"> | |
<optgroup label="Africa"> | |
<option value="Africa/Abidjan">Abidjan</option> | |
<option value="Africa/Accra">Accra</option> | |
<option value="Africa/Addis_Ababa">Addis Ababa</option> | |
<option value="Africa/Algiers">Algiers</option> | |
<option value="Africa/Asmara">Asmara</option> | |
<option value="Africa/Bamako">Bamako</option> | |
<option value="Africa/Bangui">Bangui</option> | |
<option value="Africa/Banjul">Banjul</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function guessTimeZone() { | |
// First try ECMA-402 time zone detection, unless true is passed for testing the rest of this function. | |
if (!arguments[0] && typeof Intl === "object" && typeof Intl.DateTimeFormat === "function") { | |
var tz = Intl.DateTimeFormat().resolvedOptions().timeZone; | |
if (tz === "UTC") return "Etc/UTC"; | |
if (tz && tz.indexOf('/') > -1) return tz; | |
} | |
// get the current timestamp - used throughout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var d365 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ]; | |
var d366 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ]; | |
function parts2ts(year, month, day, hour, minute, second, millisecond) { | |
if (month < 0 || month > 11) { | |
return NaN; | |
} | |
var leap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); | |
var days = leap ? d366 : d365; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using MySql.Data.MySqlClient; | |
using MySql.Data.Types; | |
namespace TestMySql | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using Xunit; | |
using Xunit.Abstractions; | |
namespace XUnitJsonTest | |
{ | |
public class Class1 | |
{ | |
private readonly ITestOutputHelper _output; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Threading; | |
namespace ConsoleApplication | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text.RegularExpressions; | |
using GeoTimeZone; // Import from Nuget package "GeoTimeZone" (https://github.com/mattjohnsonpint/GeoTimeZone) | |
using TimeZoneConverter; // Import from Nuget package "TimeZoneConverter" (https://github.com/mattjohnsonpint/TimeZoneConverter) | |
namespace AirportTimeZones; | |
internal static class Program | |
{ | |
private static void Main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- | |
This shows how you can calculate the elapsed time in MSBuild | |
--> | |
<Target Name="BeforeBuild"> | |
<PropertyGroup> | |
<startTime>$([System.DateTime]::UtcNow)</startTime> |