Converting a Flickr Datetime to a Python Datetime

1
2
3
4
5
def flickr_datetime_to_datetime(fdt):
	from datetime import datetime
	from time import strptime
	date_parts = strptime(fdt, '%Y-%m-%d %H:%M:%S')
	return datetime(*date_parts[0:6])

More like this

  1. Pickled Object Field by obeattie 5 years, 5 months ago
  2. Function to create resized versions of an image from a URL and saving it to a local path by obeattie 6 years, 2 months ago
  3. Improved Pickled Object Field by taavi223 3 years, 9 months ago
  4. FieldsetForm by Ciantic 6 years, 1 month ago
  5. JSON encode ISO UTC datetime by japerk 4 years, 1 month ago

Comments

(Forgotten your password?)