|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
|||||||||||||||||||||||||||||||||||||||||||||
2010年08月03日(火) 旧暦 [n年日記] [更新:"2010/08/04 17:08:28"]#1 [BSD] a date before the EPOCH
My machine is in Japan.
modena@makoto 07:17:50/100804(/export/pkgsrc)% ls -l /etc/localtime lrwxr-xr-x 1 root wheel 25 Apr 6 12:51 /etc/localtime -> /usr/share/zoneinfo/Japan modena@makoto 07:17:27/100804(~)% date -j -d '1970/01/01 08:59' '+%s' date: Cannot parse `1970/01/01 08:59' modena@makoto 07:17:30/100804(~)% date -j -d '1970/01/01 09:00' '+%s' 0This (argument to the 'date command') can not be used to get serial date of the birthday before 1970/01/01. Even 64 bit date ? SQL seems to have datediff function. mysql> SELECT DATEDIFF( STR_TO_DATE('08-04-2010','%d-%m-%Y'), STR_TO_DATE('10-12-1960','%d-%m-%Y')); +-----------------------------------------------------------+ | DATEDIFF( STR_TO_DATE('08-04-2010','%d-%m-%Y'), STR_TO_DATE('10-12-1960','%d-%m-%Y')) | +-----------------------------------------------------------+ | 18016 | +-----------------------------------------------------------+ 1 row in set (0.00 sec)It is dd-mm-yyyy, European Style for here. Converting a date string which is before 1970 into a timestamp in MySQL. ( つっこみ )
|
最近の日記 2024年05月06日 ・py-setuptools (python 3.11.9) ・make release took 1 hours and 10 min ・qemu invocation for 10.99.10 2024年05月05日 ・Windows 10 version ・serial connection ・bc bench 2024年05月04日 ・Trial on 10.99.10 ・another version (later trial) to succeed 2024年04月29日 ・dkim 2024年03月10日 ・停電 (瞬電) | ||