---
# System prepended metadata

title: 2038 Problem

---

# 2038 Problem
用Python
```
import time

def to_time(pp):
	print('Decimal:', pp)
	print('Binary:', bin(pp))

	ltime = time.localtime(pp)
	out = time.strftime("%Y-%m-%d %H:%M:%S", ltime)
	print('Date:', out)

time_string = "01/19/2038, 11:14:06"
result = time.strptime(time_string, "%m/%d/%Y, %H:%M:%S")
problem = int(time.mktime(result))
to_time(problem)

for i in range(3):
	print('-' * 50)
	problem += 1
	to_time(problem)
```

結果
![](https://i.imgur.com/NYAVJ2Q.jpg)
