Thanks for your idea. But let me ask you what is $off_h here? And I found that correct result occurs when I subtract $gmt[2] from $local[2]:
$diff=$local[2]-$gmt[2] + ($gmt[5] <=> $local[5] || $gmt[7] <=> $local[7])*24;
--dda
In reply to Re: Re: Re: Re: How to get TZ difference?
by dda
in thread How to get TZ difference?
by dda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |