I get time and format
{{transaction.submitTime | date:'yyyy-MM-dd HH:mm:ss Z'}}
It returns
2015-04-23 02:18:43 +0700
But I want to show without +0700, that hour will plus 7.
How can I do that?
Try this
d = new Date();
d.toLocaleString(); // -> "2/1/2013 7:37:08 AM"
d.toLocaleDateString(); // -> "2/1/2013"
d.toLocaleTimeString(); // -> "7:38:05 AM"
Take a look at the format string you supplied in relation to the output you got:
yyyy-MM-dd HH:mm:ss Z
2015-04-23 02:18:43 +0700
Note how each element of the format string corresponds to an element of the output?
Z represents the time zone. To get rid of it, just change the format string:
yyyy-MM-dd HH:mm:ss
You'll then get a time string like this:
2015-04-22 09:48:36
'2015-04-22 19:18.43'(i.e. UTC without the time zone) or'2015-04-23 02:18:43'(i.e. system time without the time zone)?