LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 09-12-2010, 07:58 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,382
Blog Entries: 1

Rep: Reputation: 60
Smile why 12/01/1965 is an invalid date ?


just for fun, why 12/01/1965 is an invalid date ? It is a bug on date ?

Code:
miguel@quadbit:~$ date -d "12/01/1964"
Ter Dez  1 00:00:00 BRT 1964
miguel@quadbit:~$ date -d "12/01/1965"
date: invalid date `12/01/1965'
miguel@quadbit:~$ date -d "12/01/1966"
Qui Dez  1 00:00:00 BRST 1966
miguel@quadbit:~$ date -d "Dec 1 1964"
Ter Dez  1 00:00:00 BRT 1964
miguel@quadbit:~$ date -d "Dec 1 1965"
date: invalid date `Dec 1 1965'
miguel@quadbit:~$ date -d "Dec 1 1966"
Qui Dez  1 00:00:00 BRST 1966
miguel@quadbit:~$
 
Old 09-12-2010, 08:07 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,382
Blog Entries: 1

Original Poster
Rep: Reputation: 60
never mind, it is a bug on timezone files distributed by canonical for 10.04, for Brasil. Using UTC, the date is displayed just fine....
Code:
miguel@quadbit:~$ env LANG=C date -u -d "Dec 1 1965"
Wed Dec  1 00:00:00 UTC 1965
miguel@quadbit:~$
 
  


Reply

Tags
date


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date comparison with 'string date having slashes and time zone' in Bash only TariqYousaf Programming 2 10-08-2009 07:37 AM
Debian lenny: texlive-latex-base, W: invalid date kaz2100 Debian 0 11-09-2008 05:44 AM
Lenny "invalid date" on upgrade kaz2100 Debian 1 08-24-2008 02:59 AM
Setting system date and time affecting the clock and date on BIOS satimis Ubuntu 7 09-21-2007 08:02 AM
Check for invalid date Blackout_08 Programming 3 06-07-2006 08:28 PM


All times are GMT -5. The time now is 11:59 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration