Questions tagged [delorian]

Python library for working with time built on top of pytz and dateutil.

Delorean: Time Travel Made Easy

3 questions
11
votes
1 answer

when does `datetime.now(pytz_timezone)` fail?

delorean docs show this way to get the current time in a given timezone using datetime: from datetime import datetime from pytz import timezone EST = "US/Eastern" UTC = "UTC" d = datetime.utcnow() utc = timezone(UTC) est = timezone(EST) d =…
jfs
  • 399,953
  • 195
  • 994
  • 1,670
0
votes
1 answer

Variable Interpolation changes the result of Delorean functions

Right, so I've just uploaded about 26,000 notes via this HubSpot endpoint, and i've noticed that a bunch of the uploaded notes have very wrong timestamps (for example instead of being back-dated, or up-to-date, they're flung far into the…
Marko
  • 102
  • 1
  • 10
0
votes
2 answers

ValueError: String does not contain a date. Issues with Delorean, Dateutil and functions working in some places, but not others

So, I think i'm going insane. I'm using Delorean to convert a string in a CSV field row[15] into a date, which I then pass into parse() and then .epoch. Here are my imports: import sys import os.path import requests import json import csv import…
Marko
  • 102
  • 1
  • 10