FILE.date

14 views
Skip to first unread message

hcater

unread,
Mar 16, 2017, 5:16:43 PM3/16/17
to Eiffel Users
Is there a way to convert FILE.date to a format that is understood by class DATE?

I've tried using create DATE.make_by_ordered_compact_date(file.date) but it doesn't give me what I would expect as a result.

Thanks in advance,
Hubert

Emmanuel Stapf

unread,
Mar 16, 2017, 5:43:42 PM3/16/17
to Eiffel Users
Dear Hubert,

The date is in seconds since EPOCH. So you need to add that number to
a DATE_TIME instance set to EPOCH to get the proper DATE_TIME instance
matching the file's date.

Regards,
Manu
> --
> You received this message because you are subscribed to the Google Groups
> "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to eiffel-users...@googlegroups.com.
> Visit this group at https://groups.google.com/group/eiffel-users.
> For more options, visit https://groups.google.com/d/optout.



--
------------------------------------------------------------------------
Eiffel Software
805-685-1006
http://www.eiffel.com
Customer support: http://support.eiffel.com
User group: http://groups.eiffel.com/join
------------------------------------------------------------------------

Hubert Cater

unread,
Mar 17, 2017, 5:59:40 PM3/17/17
to eiffel...@googlegroups.com
Thanks Manu and it looks like using 'DATE_TIME.make_from_epoch' got me to what I was after.



Virus-free. www.avast.com

On Thu, Mar 16, 2017 at 5:43 PM, Emmanuel Stapf <ma...@eiffel.com> wrote:
Dear Hubert,

The date is in seconds since EPOCH. So you need to add that number to
a DATE_TIME instance set to EPOCH to get the proper DATE_TIME instance
matching the file's date.

Regards,
Manu

On Thu, Mar 16, 2017 at 2:16 PM, hcater <hubert....@gmail.com> wrote:
> Is there a way to convert FILE.date to a format that is understood by class
> DATE?
>
> I've tried using create DATE.make_by_ordered_compact_date(file.date) but it
> doesn't give me what I would expect as a result.
>
> Thanks in advance,
> Hubert
>
> --
> You received this message because you are subscribed to the Google Groups
> "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> Visit this group at https://groups.google.com/group/eiffel-users.
> For more options, visit https://groups.google.com/d/optout.



--
------------------------------------------------------------------------
Eiffel Software
805-685-1006
http://www.eiffel.com
Customer support: http://support.eiffel.com
User group: http://groups.eiffel.com/join
------------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages