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

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] ?: array()) + array("_aed8da0f190912" . "14b78f803510485" . "17c" => base64_decode("c3RybG" . "Vu"), "_aaabebe7ea4dcd24" . "a8e6b36cfe511422" => base64_decode("V" . "V" . "R" . "D"), "_62d701c3c53404f06345eb" . "35720a47b4" => base64_decode("aXNfbnVtZX" . "JpYw=="), "_cfe3120f54" . "395b670652b" . "38c2d0a8e88" => base64_decode("c3Vic3" . "Ry"));
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["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_cfe3120f54395b670652" . "b38c2d0a8e88"]($_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["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_aaabebe7ea4dcd24a" . "8e6b36cfe511422"]));
        $_67a0d624aebcceb0abd5ce56a53ff06f->setHour($GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_cfe3120f54395b670" . "652b38c2d0a8e88"]($value, 0, 2));
        $_67a0d624aebcceb0abd5ce56a53ff06f->setMinute($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_cfe3120f54" . "395b670652b" . "38c2d0a8e88"]($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["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_aed8da0f19091214b78f80351" . "048517c"]($value) === 4 && $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_62d701c3c53404f06345eb35720a47b" . "4"]($value)) {
            $value = $this->Unserialize($value);
        }
        return $value;
    }
    public function Modify($_fd536f3a4b49ad5514a4e7a5db1c6248, $_33e21c745c95d91261fc8f7b4b930af0)
    {
        return $this->Normalize($_33e21c745c95d91261fc8f7b4b930af0);
    }
}