I have an API, which reads the time format from TZ variable using getenv
EST+5EDT,M3.2.0/2,M11.1.0/2
Here M3.2.0/2 is the DST begin date and time M11.1.0/2 is the DST end date and time
Note: |This format specifies day d of week w of month m. The day must be between 0(Sunday) and 6 , week must be between 1 and 5; week1 is the first week in which day d occurs and week 5 specifies the last d in the month. The month is between 1 and 12.|
I want to print the start date as Mar/08 Sun @2.00pm
and end date as Nov/01 Sun @2.00pm
If in my own code, I can parse the TZ and get the start(M3.2.0/2) and end(M11.1.0/2) dates. But I need to get the correct date format.
Is there any way to do it with library functions or I need to create my own code.