These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Javascript for 12 hour time display -- 12:00 am displaying as 00:00 am

khillebrand
Registered: Apr 24 2006
Posts: 26

I am creating a dynamic stamp and everything works fine. The only problem is that when I get to 12:00 am, the time displays as 00:00 am. 12:01 am displays as 00:01 am. All the other hours work fine, including 12:00 pm. Why is this happening and can I change it? Here is my code:

var timeFiled = "Time: " + util.printd("hh:MM:ss tt", new Date());
event.value = timeFiled;

My Product Information:
Acrobat Pro 8.1.2, Windows
khillebrand
Registered: Apr 24 2006
Posts: 26
Actually on second thought I'm thinking that this is just a bug in the code of the function. It is using military time for AM hours, then subtracting 12 for each hour on PM hours. There is no exception written to add 12 to the zero hour...