Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
[SOLVED] Meta Data: Date Value
Avatar
roga #1
Member since Sep 2018 · 35 posts · Location: Zürich, Switzerland
Group memberships: Members
Show profile · Link to this post
Subject: [SOLVED] Meta Data: Date Value
Hi,

I saw, that DokuWiki store the creation Date of a page in the File pagename.meta, like e.g.  i:1548864478;

This stored value is in a unknow format for me and I would like to convert it in a readable date/time value.

Can someone tell me, how I could convert this integer value in a date/time value?

I would be happy for every help!

regards,
Roland
This post was edited on 2019-01-30, 20:06 by roga.
Avatar
schplurtz (Moderator) #2
Member since Nov 2009 · 463 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
The whole line in a .meta file is a serialized PHP array. See http://php.net/unserialize

The number itself is a unix timestamp. The number of seconds elapsed since the "Epoch" (1970-01-01 00:00 GMT).
To convert to a date, see,for example,  https://stackoverflow.com/questions/10040291/converting-a-… .
Avatar
roga #3
Member since Sep 2018 · 35 posts · Location: Zürich, Switzerland
Group memberships: Members
Show profile · Link to this post
Hi schplurtz,

It work's! Thank you very much!

Your answer was exactly what I was searching for :-)

regards,
Roland
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-24, 02:24:43 (UTC +02:00)