• Welcome to Simple Machines Community Forum. Please login or sign up.
September 18, 2021, 12:09:03 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


请问时间设置的格式是什么?

Started by peacock, August 18, 2009, 12:35:01 PM

Previous topic - Next topic

peacock

我和php的date函数对比了下,发现有些参数还是不一样,不知道smf是按照什么参数规则来设定时间格式的

Andrew0802


Definition of the format used to represent dates (OCYYDDD+)

The numbers are written in +ve byte packed decimal.

'0C' is the number of centuries since 1900. All dates in the 21st century have '01'.

'YY' is the year.

'DDD' is the day of the year. The first day of the year is '1' and the last day of the year '366'.

'+' is hard coded as 0xC.

Examples
10 January 2007 = 0x0107010C

1 January 2001 = 0x0101001C

31December 2012 = 0x0112366C
patent search [nofollow]|funny patent [nofollow]

Advertisement: