Re: [Cppcms-users] How to format readable date from unix timestamp within template?
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2013-12-08 09:52:38
|
> r.date_returned is a time_t unix timestamp.
>
> <% gt "{1,datetime=s}" using r.date_returned %>
> <%= r.date_returned | date %>
> <%= r.date_returned | strftime("%d/%m/%Y") %>
> What am I missing?
>
> thanks,
>
> augustin.
It actually should work....
How do you render the template?
What are the locale settings?
Do you render to a stream that isn't the respone().out()?
The only point I can see that this isn't working is that the stream you
are rendering into is missing the locale configuration.
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
|