December 2, 2008 § 2 Comments

I really miss Ruby’s, too bad Python does not have something as convenient.

So I created one:

import datetime
import time

class TimeUtil():
	def to_i(cls, t=None):
		if t is None:
			t = datetime.datetime.utcnow()
		return time.mktime(t.timetuple())

Where Am I?

You are currently viewing the archives for December, 2008 at RAPD.