date is not correct

From: ahmed lasheen <ahmed4kernel_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 08 2011 - 11:53:13 MST

i am trying to print the intial time for wam model grib file.
the intial time was
(0) 12/07/2011 (12:00)
and when i used the following code to print it in formate of names of
months and days of week
it give me the following
(0) 12Z TUE 07 Dec 2011
and this is wrong as the 7 of December is Wednesday not Tuesday.

*month_abbr =
days_abbr = (/"SAT","SUN","MON","TUE","WED","THR","FRI"/)
;;;;;;;;;;;;;;;;;Dealing with the intial time***
stc_ini_time=stringtochar(ini_time);string to character(stc)
;print(stc_ini_time) ;print if you want
;;for further information about coverting form string to integers see the
ini_time_print =sprinti(" %0.2i",ihour)+"Z
"+days_abbr(day_of_week(iyear,imonth,iday))+sprinti(" %0.2i
",iday)+month_abbr(imonth)+sprinti(" %0.4i ",iyear)*

so what is going wrong with previous code .
i have attached the script and the output .
thanks in advance

Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Thu Dec 8 11:54:07 2011

This archive was generated by hypermail 2.1.8 : Fri Dec 09 2011 - 13:09:09 MST