| Author |
Message |
|
| Guest |
Posted: Sat Mar 20, 2010 3:38 am |
|
|
|
Guest
|
Hi,
I am sure everyone else is displaying dates fine, so it must be me,
but I have tried all the combinations i can think of.
The data in my database looks good (as io:format-ed after reading) but
displays as an integer.
My _types record contains this:
dob = {date,[{format, "YYYY-MM-DD"},
{description, "Date of Birth"}]}
and my html looks thusly:
<p>date of birth: <wpart:lookup key="player:dob" format="date" /></p>
but the display is just a number :
date of birth: 61661174400
i.e. the date in seconds.
What am i doing wrong?
Thanks,
graeme
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Sat Mar 20, 2010 8:25 am |
|
|
|
Guest
|
On 20 March 2010 15:07, alexander barakin <alex.barakin@gmail.com> wrote:
> On Sat, Mar 20, 2010 at 06:37, Graeme Defty <graeme.defty@gmail.com> wrote:
>> Hi,
>>
>> I am sure everyone else is displaying dates fine, so it must be me,
>> but I have tried all the combinations i can think of.
>>
>> The data in my database looks good (as io:format-ed after reading) but
>> displays as an integer.
>>
>> My _types record contains this:
>>
>> |
|
|
| Back to top |
|
| Guest |
Posted: Sat Mar 20, 2010 9:24 am |
|
|
|
Guest
|
On Sat, Mar 20, 2010 at 11:25, Graeme Defty <graeme.defty@gmail.com> wrote:
> On 20 March 2010 15:07, alexander barakin <alex.barakin@gmail.com> wrote:
>> On Sat, Mar 20, 2010 at 06:37, Graeme Defty <graeme.defty@gmail.com> wrote:
>>> Hi,
>>>
>>> I am sure everyone else is displaying dates fine, so it must be me,
>>> but I have tried all the combinations i can think of.
>>>
>>> The data in my database looks good (as io:format-ed after reading) but
>>> displays as an integer.
>>>
>>> My _types record contains this:
>>>
>>> dob = {date,[{format, "YYYY-MM-DD"},
>>> {description, "Date of Birth"}]}
>>>
>>> and my html looks thusly:
>>>
>>> <p>date of birth: <wpart:lookup key="player:dob" format="date" /></p>
>>>
>>> but the display is just a number :
>>>
>>> date of birth: 61661174400
>>>
>>> i.e. the date in seconds.
>>
>> because 61661174400 is in far future? (:
>> $ date -d @61661174400
>> Thu Dec 20 03:00:00 MSK 3923
>>
>> --
>> wbr, alexander barakin aka sash-kan.
>>
>
> I don't think so.
>
> 61661174400 is 1953-12-17 in seconds.
>
> 1953-12-17 is what i put in the database and what i see read out of it
> again, as I mentioned.
1953 — date before unix epoch, which starts at 1970-01-01:
$ date -d '1953-12-17' +'%s'
-506228400
--
wbr, alexander barakin aka sash-kan.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Sun Mar 21, 2010 1:25 am |
|
|
|
Guest
|
On 20 March 2010 16:24, alexander barakin <alex.barakin@gmail.com> wrote:
> On Sat, Mar 20, 2010 at 11:25, Graeme Defty <graeme.defty@gmail.com> wrote:
>> On 20 March 2010 15:07, alexander barakin <alex.barakin@gmail.com> wrote:
>>> On Sat, Mar 20, 2010 at 06:37, Graeme Defty <graeme.defty@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> I am sure everyone else is displaying dates fine, so it must be me,
>>>> but I have tried all the combinations i can think of.
>>>>
>>>> The data in my database looks good (as io:format-ed after reading) but
>>>> displays as an integer.
>>>>
>>>> My _types record contains this:
>>>>
>>>> |
|
|
| Back to top |
|
| Guest |
Posted: Mon Mar 22, 2010 12:32 pm |
|
|
|
Guest
|
Graeme Defty <graeme.defty@gmail.com> writes:
> My _types record contains this:
>
> dob = {date,[{format, "YYYY-MM-DD"},
> {description, "Date of Birth"}]}
>
> and my html looks thusly:
>
> <p>date of birth: <wpart:lookup key="player:dob" format="date" /></p>
These two places have no connection with eachother; the wpart:lookup
can't get the format from your wtype. Try something like:
<wpart:lookup key="player:dob" format="date(YYYY-MM-DD)" />
--
Magnus Henoch, magnus@erlang-solutions.com
Erlang Solutions
http://www.erlang-solutions.com/
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|