{"id":122,"date":"2009-02-06T09:06:16","date_gmt":"2009-02-06T16:06:16","guid":{"rendered":"http:\/\/cknotes.com\/?p=122"},"modified":"2009-02-06T09:06:16","modified_gmt":"2009-02-06T16:06:16","slug":"perl-datetime-properties","status":"publish","type":"post","link":"https:\/\/cknotes.com\/perl-datetime-properties\/","title":{"rendered":"Perl Date\/Time Properties"},"content":{"rendered":"<p>Any date\/time property in Chilkat&#8217;s Perl implementation is returned as a SYSTEMTIME object.<\/p>\n<p>Here is sample code that demonstrates getting the ValidTo and ValidFrom property from a digital certificate:<\/p>\n<pre>\r\n\t$sysTime0 = new chilkat::SYSTEMTIME();\r\n\t$cert->get_ValidFrom($sysTime0);\r\n\t\r\n\t$sysTime1 = new chilkat::SYSTEMTIME();\r\n\t$cert->get_ValidTo($sysTime1);\r\n\t\r\n\tprint \"Valid from \" . $sysTime0->{wMonth} . \"\/\" . \r\n\t\t$sysTime0->{wDay} . \"\/\" . $sysTime0->{wYear} . \r\n\t\t\" to \" . $sysTime1->{wMonth} . \"\/\" . $sysTime1->{wDay} . \r\n\t\t \"\/\" . $sysTime1->{wYear};\r\n<\/pre>\n<p>The members of the SYSTEMTIME object are as follows:<\/p>\n<pre>\r\n\/\/ In C++ syntax:\r\nstruct SYSTEMTIME {\r\n    unsigned short wYear;\r\n    unsigned short  wMonth;\r\n    unsigned short  wDayOfWeek;\r\n    unsigned short  wDay;\r\n    unsigned short  wHour;\r\n    unsigned short  wMinute;\r\n    unsigned short  wSecond;\r\n    unsigned short  wMilliseconds;\r\n};\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Any date\/time property in Chilkat&#8217;s Perl implementation is returned as a SYSTEMTIME object. Here is sample code that demonstrates getting the ValidTo and ValidFrom property from a digital certificate: $sysTime0 = new chilkat::SYSTEMTIME(); $cert->get_ValidFrom($sysTime0); $sysTime1 = new chilkat::SYSTEMTIME(); $cert->get_ValidTo($sysTime1); print &#8220;Valid from &#8221; . $sysTime0->{wMonth} . &#8220;\/&#8221; . $sysTime0->{wDay} . &#8220;\/&#8221; . $sysTime0->{wYear} . &#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[167,495],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-datetime","tag-perl"],"_links":{"self":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/comments?post=122"}],"version-history":[{"count":0,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}