how to convert PHP hex date and time
Hello all,
While querying my switch with snmp I got hex value of date and time "07 DD 04 10 09 32 37 02 " which is equal to " 07 DD = 2013 (Year) 04 = 4 (month) 10 = 10 (day) 09 = 9 (hour) 32 = 50 (min) 37 = 55 (sec) 02 = 2 How can I convert hex date and time with php scripts? thank you |
are those hexes in strings or pure binary value? at least us how it is currently stored.
|
Those are hex value. Below is the actual output from snmpwalk:
SNMPv2-SMI::enterprises.2011.6.128.1.1.2.57.1.23.4227860224.2 = Hex-STRING: 07 DD 04 10 09 32 37 02 |
See hexdec() fn http://php.net/manual/en/function.hexdec.php
|
All times are GMT -5. The time now is 08:15 PM. |