Find the answer to your Linux question:
Results 1 to 2 of 2
Hello everybody, When I type date in the command prompt, the month is outputted as text. Now, I would like to change this specific setting using a script. I have ...
  1. #1
    Just Joined!
    Join Date
    May 2007
    Posts
    1

    Changing LC_TIME locale

    Hello everybody,

    When I type date in the command prompt, the month is outputted as text. Now, I would like to change this specific setting using a script. I have already found out what to change. If you type locale -k LC_TIME, you will get a list of LC_TIME variables (please refer to the bottom of this post).

    The line which I am interested in is: date_fmt="%a %b %e %H:%M:%S %Z %Y".

    If I am correct, I should change the %b into %m and when I issue the date command again, may will have changed to 5 (please note my language setting is dutch )

    Could some please tell me how to do this. I've been looking for ages now!

    Many thanks,

    Jeroen

    abday="zo;ma;di;wo;do;vr;za"
    day="zondag;maandag;dinsdag;woensdag;donderdag;vri jdag;zaterdag"
    abmon="jan;feb;mrt;apr;mei;jun;jul;aug;sep;okt;nov ;dec"
    mon="januari;februari;maart;april;mei;juni;juli;au gustus;september;oktober;november;december"
    am_pm=";"
    d_t_fmt="%a %d %b %Y %T %Z"
    d_fmt="%d-%m-%y"
    t_fmt="%T"
    t_fmt_ampm=""
    era=
    era_year=""
    era_d_fmt=""
    alt_digits=
    era_d_t_fmt=""
    era_t_fmt=""
    time-era-num-entries=0
    time-era-entries="z"
    week-ndays=7
    week-1stday=19971130
    week-1stweek=0
    first_weekday=2
    first_workday=1
    cal_direction=1
    timezone=""
    date_fmt="%a %b %e %H:%M:%S %Z %Y"
    time-codeset="UTF-8"

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Hi Jeroen,

    I don't know what you're trying to achieve. If you want to get the Dutch format try this:

    Code:
    date +%d-%m-%Y
    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...