This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:sidebar:remoteapi:apiref:format:time:example [13/01/2016 12:25] stan |
en:sidebar:remoteapi:apiref:format:time:example [03/03/2021 08:55] chdi [Example of time zone receiving tz] |
||
---|---|---|---|
Line 6: | Line 6: | ||
---- | ---- | ||
1. Mathematical AND should be applied to the Azores [[timezone|timezone]] using **0xf000ffff** mask. | 1. Mathematical AND should be applied to the Azores [[timezone|timezone]] using **0xf000ffff** mask. | ||
+ | Each time decimal signed value shoud be perfomed to binary value using [[http://https://www.exploringbinary.com/twos-complement-converter/| decimal to two’s complement ]]method | ||
<code=javascript> | <code=javascript> | ||
-3600 & 0xf000ffff | -3600 & 0xf000ffff | ||
Line 23: | Line 24: | ||
1) Mathematical AND should be applied to the ‘tz’ parameter using **0xffff** mask. | 1) Mathematical AND should be applied to the ‘tz’ parameter using **0xffff** mask. | ||
<code=javascript> | <code=javascript> | ||
- | -134155792 & 0xffff | 0xFFFF0000 | + | -134155792 & 0xffff |
61936 | 61936 | ||
</code> | </code> | ||
+ | <note important> Only if the original tz value < 0 (it is in this example), then mathematical OR should be applied to the result using the mask 0xffff0000. If tz value > 0, the following step is not needed.</note> | ||
2) Mathematical OR should be applied to the result using the mask **0xffff0000**. | 2) Mathematical OR should be applied to the result using the mask **0xffff0000**. | ||
<code=javascript> | <code=javascript> |
|