Date Time Format changed in nusoap.php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
barryjenkins
Forum Newbie
Posts: 3
Joined: Sun Dec 18, 2011 5:09 pm

Date Time Format changed in nusoap.php

Post by barryjenkins »

Hi,

I have noticed on my print order section in my cart that the date/time is in US format ie. there is an entry that calls up "date_purchased" and places this in the following format %Y-%m-%d %H:%M:%S

I have searched all the text in my online shop and I have located the code i believe is responsible under \includes\classes\nusoap.php

This is in the following entry

Code: Select all

return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec);
My question is can i change this code to either of the following without causing any damage else where in the site?

I am not sure if it needs the %H:%M:%S', $sec entry here for anything??? I dont want to cause issues anywhere else...

Code: Select all

return strftime ('%d-%m-%Y %H:%M:%S', $sec);
or

Code: Select all

return strftime ('%d-%m-%Y );


Many Thanks,
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Date Time Format changed in nusoap.php

Post by Christopher »

The format "%Y-%m-%d %H:%M:%S" is probably for values saved into the database. That is pretty standard. You can reformat this value when you display it.
(#10850)
Post Reply