本文整理汇总了Python中sentry.coreapi.process_data_timestamp函数的典型用法代码示例。如果您正苦于以下问题:Python process_data_timestamp函数的具体用法?Python process_data_timestamp怎么用?Python process_data_timestamp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了process_data_timestamp函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_timestamp_iso_timestamp_with_Z
def test_timestamp_iso_timestamp_with_Z(self):
data = process_data_timestamp({
'timestamp': '2012-01-01T10:30:45Z'
})
d = datetime.datetime(2012, 01, 01, 10, 30, 45)
self.assertTrue('timestamp' in data)
self.assertEquals(data['timestamp'], d)
示例2: test_iso_timestamp_with_ms
def test_iso_timestamp_with_ms(self):
d = datetime(2012, 01, 01, 10, 30, 45, 434000)
data = process_data_timestamp({
'timestamp': '2012-01-01T10:30:45.434'
}, current_datetime=d)
self.assertTrue('timestamp' in data)
self.assertEquals(data['timestamp'], d)
示例3: test_timestamp_iso_timestamp_with_Z
def test_timestamp_iso_timestamp_with_Z(self):
d = datetime(2012, 01, 01, 10, 30, 45)
data = process_data_timestamp({
'timestamp': '2012-01-01T10:30:45Z'
}, current_datetime=d)
self.assertTrue('timestamp' in data)
self.assertEquals(data['timestamp'], 1325413845.0)
示例4: test_timestamp_iso_timestamp_with_Z
def test_timestamp_iso_timestamp_with_Z(self):
data = process_data_timestamp({"timestamp": "2012-01-01T10:30:45Z"})
d = datetime.datetime(2012, 01, 01, 10, 30, 45)
self.assertTrue("timestamp" in data)
self.assertEquals(data["timestamp"], d)