close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


How to change time from 5 to 17:00

Thread began 6/01/2010 1:56 pm by tone397472 | Last modified 6/05/2010 4:21 am by tone397472 | 1665 views | 11 replies |


How to change time from 5 to 17:00 (12 to 24 hours)

Hi, Ho do I change the time from 12 to 24 hours so 5 is 5 or 17:00 in Universal Email4?
Is this only possible in the code?!

Sign in to reply to this post

Jimmy Wu

The email time stamp I believe is dependent on the email server that it is sent from and the format that the user's email client is displaying it as, not something that is set up in the email itself.

Sign in to reply to this post


The time stamp outside of the mail (in de header outside the mail) is correct, but on the 3e line of the HTML mail (you only see this after opening the mail!) you also have the time and date from when the mail was send:

6-1-2010 | 8:50 PM CEST . <<<===This is how it looks!

And that is unacceptable on the European continent, because they use 24 hours. I contacted my mail server and web host and they where saying that only the time stamp outside of the mail (the one that is correct!) was produced by the local (receiving mail host) you can adjust that in your email settings of your local host, but the the time in the mail ( that is not correct!) was produced by the php script in my web site on the web site's host?!

I'm learning about formatting time stamps at the moment, but don't know where to find them in the script and what to do. I can only find the date formatting in the Center.php script, but it looks like the time is there also but not formatted.

Examples from my study book of what I'm talking about:

echo strftime('%A<br />');
echo strftime('%x<br />');
echo strftime('%c<br />');
echo strftime('%Y<br />;

So I do not know what the real story is and how to solve this. I would be nice if it is only a little adjustment in the script like formatting the time. I'm sure I'm not the only one with this problem.

Please some help would be nice.

Sign in to reply to this post

Jimmy Wu

You're the first person I've helped with this so far, but that date is indeed controlled by the script. In your mail_PHP.php file, find something that looks like this:
$mailHeader .= "Date: ". date('r (T)').$lineEnd;

Change the line to look like this:
$mailHeader .= "Date: ". date('m-d-Y G:i:s (T)').$lineEnd;

Or you could change the format to look like how you want it to look using this guide:

Sign in to reply to this post


Originally Said By: Jimmy Wu
  You're the first person I've helped with this so far.  

I take that as a compliment!

Think this is about the same problem:


Well Jimmy I think it's common sense to have a option for Formatting time and date because:
24-hour clock
From Wikipedia, the free encyclopedia
"This system is the most commonly used time notation in the world today."

The 24-hour clock is a convention of time keeping in which the day runs from midnight to midnight and is divided into 24 hours, indicated by the hours passed since midnight, from 0 to 23.

This system is the most commonly used time notation in the world today.

[1] The 12-hour clock is, however, still dominant in a handful of countries,[1] particularly in Australia, Canada (except Quebec), the Philippines and the United States. In many countries both time systems are used, although, 12 hour time is mostly used in vocal speech for ease of use, and 24 hour time is preferred in writing. 24-hour notation is also popularly referred to as military time or astronomical time in the United States and Canada,[2] and in Australia (though rarely).[citation needed] In some parts of the world, it is called railway time or continental time. It is also the international standard notation of time (ISO 8601).[3] In the practice of medicine, the 24-hour clock is generally used in documentation of care as it precludes any ambiguity as to what time events occurred in the patient's medical history.

Thanks for your help, but the 24 hours is missing as a standard option, while most of the world is using it.

When somebody on the European continent (where I work) receives a email with AM and PM and CEST they do not know what this is about and it looks very stupid. And it's a bit strange that nobody has ever talked about it and that your company is not aware of this and it's also possible that the people with a problem changed it in the code and never contacted Web Assist about it.

You would expect it in the extension when you click the white envelope Email option you see "Email object" and "Character set" But no "Format Date" and "Format time".

Sign in to reply to this post


Hi Jimmy, I did try your suggestion in the code, but this doesn't change the date and time Format in the email.

The date is also wrong for most people in the world, because now it's:

like 6-1-2010 We must read this as the first of June 2010, but looks for most people in the world like the 6e of January 2010.

I'm sorry but it looks like a little stupid thing, but it makes the difference between a professional looking email or very amateurish one.

This proves what I'm writing: File:Date_upd1.PNG You in the US and 1 African country is using the format you are using. The rest of the world the one I'm trying to produce with UE4. And the same story for the time Format.

Looks like we found a good suggestion for the new update: Time and Date format options. When you think about things like this (look outside your borders) when naming your product "UNIVERSAL EMAIL" it's not "US EMAIL" when developing a product and selling it on line to the world it will boost your sales!!!!

Sign in to reply to this post

Jimmy Wu

The time is still showing up with 12 hour times?

The capital G specifies a 24 hour time, so it should be showing up correctly now.

As for the date issue, just switch the m and d like this:
$mailHeader .= "Date: ". date('d-m-Y H:i:s (T)').$lineEnd;

I also changed the capital G to a capital H which is also another setting for the military time.

Sign in to reply to this post


Hi I only got the date now like I want, had to change the code in the Center.php as well to get it working! <?php echo date ("d-m-Y-G-i-s", $now.......................

Of course I can get the time after the date by coding the above written code.

d-m-Y=the date like I want G-i-s=the time I want, but then I still have the American time at the right of the date and time, because this is created by time()?!. So how do I go from here?!
This is what I get====>>> 03-06-2010-22-39-22 | 10:39 PM CEST The first part is correct I don't want the 2e part or it must be the 24 hour time.

Why don't you respond to my points about date and time formatting option it's no nonsense it's facts now I have to change this all the time!

I get this code on the first line in the mail: PHPSESSID: c3521231a794ca13717f55104cbb1563

Sign in to reply to this post


Can you please help me I'm busy with this for 4 day's now! Do I have to wait everyday for only one answer to a question. Or can a problem be solved in a couple of hours like every normal company does?!!! This is how it go's all the time. And is totally unacceptable! I also don't understand why you don't respond to my points about the standard programmed time and date formatting in the extension. I proved to you that the Format you are using is only used by a small amount of people in the world. 24 hour time is the most commonly time used in time notation in the world and DD-MM-YY is used in all countries of the world except for 1 African country and the US! So is it not strange then that I have to change this in the code?!

Can you please help me with solving the problems: The date is ok and outputs the date and the correct time but the American time is still there at the right:
This is what I get====>>> 03-06-2010-22-39-22 | 10:39 PM CEST The first part is correct I don't want the 2e part or it must be the 24 hour time.

I get this code on the first line in the mail: PHPSESSID: c3521231a794ca13717f55104cbb1563 Did some testing and it looks like this code only appears when the text area is not filled till the end and the next line! So if I only type a couple of words in the text area (not even 1 line) I get the code. And the text from the text area. When I type a text in the text area till the end and on the next line no code. Only the text. I can reproduce this as much as I like so I think this is a bug!

Sign in to reply to this post

Jimmy Wu

Most of our customers are US users, so that is why it is set up that way. In addition, we are a US based company. In addition, to get your ideas seen, you would be best to post in the wishlist forum, where the product development team will see it and determine whether or not we will incorporate it into a future version of the product.

We try to help our customers as quickly as possible and the response times are within our support policies which is part of the user agreement. Also, changing the date format isn't actually a supported functionality, so I'm actually giving you additional instruction outside of what is required.

Try this instead:
$mailHeader .= "Date: ". date('d-m-Y H:i:s').$lineEnd;

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...