UNIX时间是否记录时区? [英] Does UNIX time record Timezone?

查看:269
本文介绍了UNIX时间是否记录时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下UNIX时间,UNIX时间是否记录时区?

I want to ask about UNIX time, Does UNIX time record Timezone?

我将我的托管服务从芝加哥/美国转移到了JST.

I moved my hosting from Chicago/America to JST.

问题是我的整个MySQL数据库都有UNIX时间(芝加哥/美国时区)的记录

The problem is that my whole MySQL database has records of UNIX time (Chicago/America timezone)

我有一个PHP代码可以显示时间(例如3天前,昨天等) 当我移到新服务器时,明天会显示

I have a PHP code to show the time ago (ex 3days ago, yesterday, etc) When I move to the new server it says tomorrow

为了避免明天发生这种情况,是否可以将服务器停机一天以与当前服务器的时区同步?

To avoid this tomorrow, is it ok to make the server down for one day in order to synchronize with the current server's timezone?

我担心UNIX时间不仅会记录日期和时间,还会记录时区...

I worry that the UNIX time doesn't only record the date and time, but also the timezone...

我可以设置PHP.ini时区,但是会降低我的Apache的速度吗?

I can set the PHP.ini timezone, but will it slowdown my Apache?

推荐答案

"0"在UNIX时间是UTC时间1970年1月1日.每个UNIX时间都是从该日期,时间和时区开始的秒数.

"0" in UNIX time was 1st January 1970 in UTC time. Every UNIX time is the seconds from that date, time, and timezone.

这篇关于UNIX时间是否记录时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆