1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting date and time

Discussion in 'General' started by dioon, Sep 23, 2010.

  1. dioon

    dioon New Member

    Messages:
    4
    Likes Received:
    0
    FreeBSD 8.1-RELEASE 64bit

    Code:
    # date 100923093320
    date: illegal time format
    usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
                [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
    Tried to set today's date and time,but received this error message.
    Date and time I wanted was:
    Thursday 23 September 2010. 09.33.20s this being YYMMDDHHMMSS

    Code:
    Sun Oct 10 09:49:57 BST 2010
    This is what I get with the Date command.
     
  2. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,427
    Likes Received:
    16
    Try it without the seconds.
     
  3. dioon

    dioon New Member

    Messages:
    4
    Likes Received:
    0
    Thank you SirDice all fine now.
     
  4. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,427
    Likes Received:
    16
    If you have Internet access on that machine and your ISP has an NTP server you can also use ntpdate(8) to set the time correctly. Or install net/openntpd to keep it constantly in sync. The ntpd(8) from the base will also work but it's a bit limited.
     
  5. fronclynne

    fronclynne New Member

    Messages:
    1,297
    Likes Received:
    0
    Anyone with sisters or a wife knows to mind the period

    What you wanted was # date 1009230933.20.