Skip to content

Instantly share code, notes, and snippets.

View nigelmcnie's full-sized avatar

Nigel McNie nigelmcnie

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nigelmcnie on github.
  • I am nigelmcnie (https://keybase.io/nigelmcnie) on keybase.
  • I have a public key ASCWwKm5TIv5DdQRH3gyBLp3YD5-PeY-FWVkpZKMr_OKIwo

To claim this, I am signing this object:

@nigelmcnie
nigelmcnie / gist:ae856b5804fa9713f54e
Last active August 29, 2015 14:07
Quantum datetime library for python - demo
# Create a quantum, which represents an exact point in time. Internally, the point of time is stored
# as UTC
> t1 = quantum.now()
<Quantum(2014-10-01 20:23:57.745648, no timezone)>
# We can ask for that point of time "at" a certain timezone. Relevant for datemath and display
> t1.at('Pacific/Auckland')
<Quantum(2014-10-01 20:23:57.745648, Pacific/Auckland)>
# We can get a naive datetime out of it at any TZ