diff -r 000000000000 -r 40c8f766c9b8 src/cm/utils/date.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/utils/date.py Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,16 @@ +import time +from django.utils.translation import ugettext as _ + +#http://docs.python.org/lib/module-time.html +def datetime_to_user_str(dt): + return dt.strftime(str(_("%Y-%m-%d %H:%M"))) + +#def datetime_to_str(dt): +# return dt.strftime(CLIENT_DATE_FMT['python_output']) + +def datetime_to_epoch(dt): + return time.mktime(dt.timetuple()) + +#def datetime_to_js_date_str(dt): +# print str(1000*mktime(dt.timetuple())) +# return str(1000*mktime(dt.timetuple())) \ No newline at end of file