FW: SUGGESTION: allow TZ to be specified at time of mount (PR#124 25)

Hieb, Michael Hieb at WESTPORT.MSMAIL.AIGFPC.COM
Wed Jan 6 16:21:06 GMT 1999


Dear John,

>Samba fully honours Unix timezone info. All my sites run their Linux
hardware clocks
>set at GMT. Under Red Hat Linux, or Caldera, SuSE, or PHT TurboLinux,
the Linux
>"timeconfig" command can be used to do this. The timezone for the
server is
>selected appropriately

I ran timezone and found it had hardware clock set to GMT and TZ set to
GB. Setting TZ to GMT had no affect on the timestamps of the files.

>All files get the correct GMT time and date stamps 
>whether from Win9X or from WinNT

In my case they definitely do not. The directories are mounted from NT
servers running NT 3.51 and the timestamps show up on LINUX (TZ:GB) with
local timestamps and not GB timestamps. I tested with LINUX TZ set to
GMT with same result.

>It seems to me that you may have a configuration problem. You may care
to ask
>the samba mailing list for help on this

I did this once before and the settimeofday(2) hack was suggested. I
would love to find a way to get the directories mounted with the linux
TZ vs NT TZ adjustment applied.

Thanks for your attention to this problem.

Michael

> -----Original Message-----
> From:	John H Terpstra [SMTP:samba-bugs at samba.org]
> Sent:	Tuesday, January 05, 1999 9:01 PM
> To:	Hieb at WESTPORT.MSMAIL.AIGFPC.COM
> Subject:	Re: SUGGESTION: allow TZ to be specified at time of
> mount (PR#12425)
> 
> Michael,
> 
> Samba fully honours Unix timezone info. All my sites run their Linux
> hardware
> clocks
> set at GMT. Under Red Hat Linux, or Caldera, SuSE, or PHT TurboLinux,
> the Linux
> "timeconfig" command can be used to do this. The timezone for the
> server is
> selected
> appropriately.
> 
> All files get the correct GMT time and date stamps whether from Win9X
> or from
> WinNT.
> 
> It seems to me that you may have a configuration problem. You may care
> to ask
> the
> samba mailing list for help on this.
> 
> As to your suggested handling of the TZ info. I think this is an
> excellent idea
> and look forward to receiving your patches to Samba-2.0.0beta5 or
> later so we
> can
> include this in the master source code tree. Thank you for your
> contribution.
> 
> Cheers,
> John H Terpstra - Samba-Team
> ----------------------------------------------------------------------
> ---------------------
> The most cosly feature of Open Source Software is the Open part.
> 
-----Original Message-----
From:	Hieb, Michael 
Sent:	Tuesday, January 05, 1999 11:37 AM
To:	'samba-bugs at samba.org'
Subject:	SUGGESTION: allow TZ to be specified at time of mount

Let me start by saying SAMBA is great and my suggestion is not meant to
take away from all that SAMBA already does.

I use SAMBA to mount several NT4.0 drives from different global
locations onto one LINUX machine located in LDN. The purpose is to use
rdist on LINUX via cron to sync the contents of the drives. The problem
arises because the timestamps on the files when mounted via SAMBA are
not adjusted for timezones. As an example, if a file exists on an NT
filesystem in NYC (EDT) and has been copied with xcopy /r/e/i to an NT
filesystem in LDN (BST) and has the same timestamp in both locations
when mapped from one NT machine to another, on LINUX via SAMBA the
timestamps will differ by exactly the TZ difference. This is a problem
because rdist cannot sync the files without like timestamps. Even if I
use the timestamps from the point of view of LINUX, when users update
the files locally, I can't perform a comparison via rdist to see which
file is newer because they are updated with different time schemes.

I have a deeply unsatisfactory solution using settimeofday(2) on LINUX.
By keeping yet another copy of the volume to be synced on LINUX, I can
use settimeofday(2) to adjust the TZ on LINUX so that it affects the
timestamps on the SAMBA mounted files but not those on the LINUX master
copy. By adjusting it in turn for each of the global directories I can
sync the NT files. This is unsatisfactory because it globally affects
all SAMBA mounted files (and who knows what else), preventing direct
comparison between the drives. Further it affects timestamps on files
changed in other SAMBA mounted directories which other users may be
updating.

I assume SAMBA does not handle timezones well because NT does give you
access to TZ information at the time of mounting, otherwise you most
likely would have dealt with this long ago. Therefore my suggestion is
that in the future you might supply a parameter to be supplied at mount
time to allow the use user to specify the TZ of the mounted volume.

Michael Hieb



More information about the samba mailing list