如题如何编写当前北京时间变量
前面的我都理解了,就这个时区我是真的搞不懂
求帮忙!
这是我目前写的,怎么才能变成北京时间,gtm+8
- '当前时间:%server_time_<yyyy年MM月dd日/HH时mm分ss秒GTM+8>%'
参考答案:https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#iso8601timezone
阅读理解:
英文:
General time zone: Time zones are interpreted as text if they have names. For time zones representing a GMT offset value, the following syntax is used: GMTOffsetTimeZone: GMT Sign Hours : Minutes Sign: one of + - Hours: Digit Digit Digit Minutes: Digit Digit Digit: one of 0 1 2 3 4 5 6 7 8 9Hours must be between 0 and 23, and Minutes must be between 00 and 59. The format is locale independent and digits must be taken from the Basic Latin block of the Unicode standard.
前面的我都理解了,就这个时区我是真的搞不懂
求帮忙!
这是我目前写的,怎么才能变成北京时间,gtm+8
- '当前时间:%server_time_<yyyy年MM月dd日/HH时mm分ss秒GTM+8>%'
参考答案:https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#iso8601timezone
阅读理解:
英文:
General time zone: Time zones are interpreted as text if they have names. For time zones representing a GMT offset value, the following syntax is used: GMTOffsetTimeZone: GMT Sign Hours : Minutes Sign: one of + - Hours: Digit Digit Digit Minutes: Digit Digit Digit: one of 0 1 2 3 4 5 6 7 8 9Hours must be between 0 and 23, and Minutes must be between 00 and 59. The format is locale independent and digits must be taken from the Basic Latin block of the Unicode standard.
For parsing, RFC 822 time zones are also accepted.
谷歌翻译后:
常规时区:如果 时区具有名称,则将它们解释为文本。对于表示GMT偏移值的时区,使用以下语法:
GMTOffsetTimeZone: GMT 注册 时间 : 分 注册:一 + - 小时: 数字 数字 数字 分钟: 数字 数字 数字:一 0 1 2 3 4 5 6 7 8 9谢谢辣!%server_time_yyyy_MM_dd%
为什么要管时区?
为什么要管时区?
xmdhs 发表于 2020-3-20 23:18
%server_time_yyyy_MM_dd%
为什么要管时区?
与时区无关吗?,我以为他会显示英国那边的时间,如果不设置时区的话
Hephaistos_ 发表于 2020-3-21 00:02
与时区无关吗?,我以为他会显示英国那边的时间,如果不设置时区的话
读取的是你电脑默认的时间