{"id":1541,"date":"2024-04-05T13:00:58","date_gmt":"2024-04-05T12:00:58","guid":{"rendered":"https:\/\/ibex.tech\/c\/?p=1541"},"modified":"2024-04-05T13:01:10","modified_gmt":"2024-04-05T12:01:10","slug":"unique-value-from-datetime","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/c\/datetime\/unique-value-from-datetime","title":{"rendered":"Unique value from DateTime"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Simple 32bit value from 8bit RTC values example<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\tint32_t\tJobId;\n\n\tif (!RtcTimeIsValid)\t\t\/\/We must have valid time values\n\t\treturn(0);\n\t\n\tJobId = RtcSeconds;\n\tJobId += (int32_t)RtcMinutes * \t\t100;\n\tJobId += (int32_t)RtcHours * \t\t10000;\n\tJobId += (int32_t)RtcDayOfMonth * \t1000000;\n\tJobId += (int32_t)RtcMonth * \t\t100000000;\n\t\/\/JobId += (int32_t)RtcYear * \t\t10000000000;\t\t\/\/We don't use this as we exceede 32bits. Not an issue as we don't need to ensure uniqueness > 12 months anyway<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Simple 32bit value from 8bit RTC values example<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[],"class_list":["post-1541","post","type-post","status-publish","format-standard","hentry","category-datetime"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/comments?post=1541"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1541\/revisions"}],"predecessor-version":[{"id":1542,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1541\/revisions\/1542"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=1541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=1541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=1541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}