Re: How to get the current Timezone

2015-08-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, August 29, 2015 05:25:33 rumbu via Digitalmars-d-learn wrote: On Friday, 28 August 2015 at 23:03:16 UTC, Jonathan M Davis wrote: I _really_ wish that Microsoft would just use the TZ database like everyone else... - Jonathan M Davis Starting with Windows 8.1, it does, but

How to get the current Timezone

2015-08-28 Thread wobbles via Digitalmars-d-learn
From the docs in std.datetime, I figured I could write: Clock.currTime.timezone().name() to get the timezone this system is in. However, it just returns an empty string. Anyone know how to get the timezone of the machine easily? Thanks!

Re: How to get the current Timezone

2015-08-28 Thread Kagamin via Digitalmars-d-learn
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation ?

Re: How to get the current Timezone

2015-08-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 28 August 2015 at 14:07:37 UTC, wobbles wrote: However, it just returns an empty string. from the doc: Note that this always returns the empty string. This is because time zones cannot be uniquely identified by the attributes given by the OS (such as the stdName and dstName), and

Re: How to get the current Timezone

2015-08-28 Thread rumbu via Digitalmars-d-learn
On Friday, 28 August 2015 at 23:03:16 UTC, Jonathan M Davis wrote: I _really_ wish that Microsoft would just use the TZ database like everyone else... - Jonathan M Davis Starting with Windows 8.1, it does, but only in Windows Runtime (so called modern/store apps).

Re: How to get the current Timezone

2015-08-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 28 August 2015 at 17:59:06 UTC, WhatMeWorry wrote: Stupid question. If it always returns an empty string, why is it even there? It can return meaningful information in other subclasses; it is a method from the interface and is just blank in the LocalTime class. If you construct

Re: How to get the current Timezone

2015-08-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, August 28, 2015 18:04:16 Adam D. Ruppe via Digitalmars-d-learn wrote: On Friday, 28 August 2015 at 17:59:06 UTC, WhatMeWorry wrote: Stupid question. If it always returns an empty string, why is it even there? It can return meaningful information in other subclasses; it is a

Re: How to get the current Timezone

2015-08-28 Thread WhatMeWorry via Digitalmars-d-learn
On Friday, 28 August 2015 at 14:18:24 UTC, Adam D. Ruppe wrote: On Friday, 28 August 2015 at 14:07:37 UTC, wobbles wrote: However, it just returns an empty string. from the doc: Note that this always returns the empty string. This is because time zones cannot be uniquely identified by the