Simple Machines Community Forum

SMF Support => Language Specific Support => 中文 (Chinese) => Topic started by: peacock on August 18, 2009, 12:35:01 PM

Title: 请问时间设置的格式是什么?
Post by: peacock on August 18, 2009, 12:35:01 PM
我和php的date函数对比了下,发现有些参数还是不一样,不知道smf是按照什么参数规则来设定时间格式的
Title: Re: 请问时间设置的格式是什么?
Post by: Andrew0802 on July 19, 2010, 03:57:08 AM

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