Toggle navigation
  • 首页
  • 所有教程
  • 导航
  • Python
  • 人工智能
  • JAVA
  • 数据库
  • 前端
  • linux
  • 大数据
  • 技术文章
  • 更多
    • C/C++
    • 软件
    • 大杂烩
    • 硬件
    • 搜索

python内置时间模块 time (时间戳)

作者:马育民 • 2024-04-10 23:06 • 阅读:10134

计算机中的时间

详见 https://www.malaoshi.top/show_1IX7UEucQffQ.html

验证上文

通过代码获取当前时间,距离 1970-01-01 00:00:00 的 秒数

import time

t = time.time()
print(t)
print(t/60/60/24/365) # 换算成年

执行结果:

1712761312.336804
54.3113049320397

搜索

相关文章

python-calamine:rust实现的读取excel高性能库
python tkinter在 Windows高分屏下,窗口模糊不清晰
uv教程:基于 requirements.txt 安装依赖、导出依赖
SQLAlchemy教程:第一个例子-4.实现保存数据
SQLAlchemy教程:expire_on_commit不要设置为True
SQLAlchemy教程:创建session
FastAPI教程-集成SQLAlchemy:expire_on_commit不要设置为True
FastAPI教程-集成SQLAlchemy:在路由中执行添加数据
FastAPI教程-集成SQLAlchemy:在路由中执行查询
FastAPI教程-集成SQLAlchemy:封装表增删改查的操作文件
吉ICP备15003043号