Convert Date to AM/PM and EST5EDT?

Convert Date to AM/PM and EST5EDT?

Post by t.. » Mon, 11 Mar 1996 04:00:00

When I issue the date command on my system, it gives me the time in
24-hour notation and in PST.  The manual doesn't indicate how I can convert
the time to AM/PM notation or how I can convert it to EST5EDT.  Can anyone
help?  Thanks.

Convert Date to AM/PM and EST5EDT?

Post by Rich K » Tue, 12 Mar 1996 04:00:00

>:  what flavor of unix are you using?  it will help in answer your question.

>SunOS 4.1.3 with C-Shell.

  check man zic. it is a time zone complier for Sun.



1. how to convert a given date to Julian Date

I'm currently writing a script to cancel interrupted/suspended print jobs
from the print schedular that are older that 7 days old.

to capture the data, I am doing the following:

lpstat -u | egrep 'ntrd|suspd' > /tmp/delprnt

Note:  'lpstat -u' gives me the job ID, the user, date in '31 Jan' format

I can set the following variable to get today's date in Julian date:

juliandate=`date '+%j'`

How do I convert the date in my temp file to Julian date so that I can
perform the arithmetic to work out if the job should be deleted or not?  Or
is there an easier way to do this?

I'm lost!!  Please help this desperate newbie.  `man date` didn't really
help me!

2. Network printing

3. Converting character date to UNIX date?

4. libXaw.a

5. Calling 16-bit PM code from 32-bit PM Kernel Driver

6. PAM_pwdb[746]: get passwd; pwdb: structure is no longer valid

7. To convert...and convert...and convert again

8. Jail - Some general questions

9. Matrox Mystique ands X.

10. I am a Unix convert

11. Ok, I am converted, give it to me !!!

12. Date convert to day of the year

13. convert week number to week starting date