This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/lib/functions.php
2013-10-26 18:06:58 -05:00

30 lines
620 B
PHP
Executable File

<?php
# Haters gonna hate.
function current_user()
{
return User::current();
}
function CONFIG()
{
return Rails::application()->booruConfig();
}
# filemtime() won't precisely return the time according
# to local settings.
function filemodtime($filePath)
{
$time = filemtime($filePath);
$isDST = (date('I', $time) == 1);
$systemDST = (date('I') == 1);
$adjustment = 0;
if ($isDST == false && $systemDST == true)
$adjustment = 3600;
elseif ($isDST == true && $systemDST == false)
$adjustment = -3600;
else
$adjustment = 0;
return ($time + $adjustment);
}