現在の timestamp と microsecond をつなげた文字列が欲しい
これで何かをするわけではないが、必要になったので書いた。
import datetime import time def __get_timestr_by_now(): now = datetime.datetime.now() micro_str = str(now.microsecond).zfill(6) time_str = str(int(time.mktime(now.utctimetuple()))) return time_str + micro_str