Originally Posted By: westor
Originally Posted By: drum
'm' is replaced with the month number (5=May). 't' is replaced by 'a' or 'p' for AM or PM. 'T' does the same but with a capital letter.


Yes.. and?? i know the usage of $asctime but here the output is wrong in timezone and not in other details.


The point is that the text "GMT" is not interpreted as a timezone in the script examples that you gave us. It's interpreted as three letters, G which has no meaning and left unaltered, M which is replaced by the numeric month, and T which is replaced with A or P depending on the time of day.

$asctime does not provide a means to convert between timezones, if that is what you are trying to accomplish.

If you want the text to remain literal, don't include it inside $asctime().