<?php
namespace Claromentis\Core\Component\ValueType;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] ?: array()) + array("_aaabebe7ea4dcd24a8e6b" . "36cfe511422" => base64_decode("VVR" . "D"), "_cfe3120f54395b670652b38c" . "2d0a8e88" => base64_decode("c3V" . "ic3" . "Ry"), "_62d701c3c53404f06345eb357" . "20a47b4" => base64_decode("aXNfbnVtZXJ" . "pYw=="), "_aed8da0f19091214b" . "78f80351048517c" => base64_decode("c3RybGV" . "u"));
use Claromentis\Core\Date\DateFormatter;




class TypeTime implements ValueType
{
    
    
    
    
    
    
    
    
    public function Serialize($value)
    {
        if ($value === null) {
            return null;
        }
        $_67a0d624aebcceb0abd5ce56a53ff06f = new \Date();
        $_67a0d624aebcceb0abd5ce56a53ff06f = \Date::CreateFrom($_67a0d624aebcceb0abd5ce56a53ff06f->getDate(DateFormatter::SHORT_DATE), $value);
        if (!$_67a0d624aebcceb0abd5ce56a53ff06f) {
            throw new \Exception();
        }
        
        
        $_0dbe978d64aca9dbe1aa157ff74b5602 = (string) $_67a0d624aebcceb0abd5ce56a53ff06f->getDate(DATE_FORMAT_TIMESTAMP);
        $_c8b38c7133c2e8460c1cca42230ac6c2 = $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_cfe3120f5" . "4395b67065" . "2b38c2d0a8" . "e88"]($_0dbe978d64aca9dbe1aa157ff74b5602, 8, 4);
        return $_c8b38c7133c2e8460c1cca42230ac6c2;
    }
    public function Unserialize($value)
    {
        if (empty($value)) {
            return null;
        }
        $_67a0d624aebcceb0abd5ce56a53ff06f = new \Date();
        $_9e83734deb9316586c45570f0138251c = $_67a0d624aebcceb0abd5ce56a53ff06f->getTimezone();
        $_67a0d624aebcceb0abd5ce56a53ff06f->setTimezone(new \DateTimeZone($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_aaabebe7ea4dcd24a8e6b36cfe511" . "422"]));
        $_67a0d624aebcceb0abd5ce56a53ff06f->setHour($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_cfe3120f54395b6706" . "52b38c2d0a8e88"]($value, 0, 2));
        $_67a0d624aebcceb0abd5ce56a53ff06f->setMinute($GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_cfe3120f543" . "95b670652b38" . "c2d0a8e88"]($value, 2, 2));
        $_67a0d624aebcceb0abd5ce56a53ff06f->setTimezone($_9e83734deb9316586c45570f0138251c);
        
        
        $_c8b38c7133c2e8460c1cca42230ac6c2 = (string) $_67a0d624aebcceb0abd5ce56a53ff06f->getDate(DATE_FORMAT_CLA_TIME);
        return $_c8b38c7133c2e8460c1cca42230ac6c2;
    }
    public function Normalize($value)
    {
        if ($value === null) {
            return null;
        }
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_aed8da0f19091214b78f8" . "0351048517c"]($value) === 4 && $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_62d701c3c53404f06345eb35720a" . "47b4"]($value)) {
            $value = $this->Unserialize($value);
        }
        return $value;
    }
    public function Modify($_fd536f3a4b49ad5514a4e7a5db1c6248, $_33e21c745c95d91261fc8f7b4b930af0)
    {
        return $this->Normalize($_33e21c745c95d91261fc8f7b4b930af0);
    }
}