Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122055820
PhabricatorEpochExportField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 15, 12:34
Size
479 B
Mime Type
text/x-php
Expires
Thu, Jul 17, 12:34 (2 d)
Engine
blob
Format
Raw Data
Handle
27428434
Attached To
rPH Phabricator
PhabricatorEpochExportField.php
View Options
<?php
final
class
PhabricatorEpochExportField
extends
PhabricatorExportField
{
private
$zone
;
public
function
getTextValue
(
$value
)
{
if
(!
isset
(
$this
->
zone
))
{
$this
->
zone
=
new
DateTimeZone
(
'UTC'
);
}
try
{
$date
=
new
DateTime
(
'@'
.
$value
);
}
catch
(
Exception
$ex
)
{
return
null
;
}
$date
->
setTimezone
(
$this
->
zone
);
return
$date
->
format
(
'c'
);
}
public
function
getNaturalValue
(
$value
)
{
return
(
int
)
$value
;
}
}
Event Timeline
Log In to Comment