Date issue Win98 vs NT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stan Cook

    #1

    Date issue Win98 vs NT

    Has anyone else had this or a similar problem and is there a workaround?

    This piece of code:

    from time import gmtime, strftime
    _log = _log + "\\" + strftime("%m%d% y", gmtime()) + ".log"

    produces a file with the name 'today's date.log' on NT, but creates a file
    called 'tomorrow's date.log' on Windows 98. I would really like to know
    why this happens. Any help offered is very much appreciated.

    Thanks,

    Stan


  • Christos TZOTZIOY Georgiou

    #2
    Re: Date issue Win98 vs NT

    On Wed, 02 Jul 2003 03:50:10 GMT, rumours say that "Stan Cook"
    <scook@elp.rr.c om> might have written:
    [color=blue]
    >Has anyone else had this or a similar problem and is there a workaround?[/color]
    [color=blue]
    >This piece of code:[/color]
    [color=blue]
    >from time import gmtime, strftime
    >_log = _log + "\\" + strftime("%m%d% y", gmtime()) + ".log"[/color]
    [color=blue]
    >produces a file with the name 'today's date.log' on NT, but creates a file
    >called 'tomorrow's date.log' on Windows 98. I would really like to know
    >why this happens. Any help offered is very much appreciated.[/color]

    Are you by any chance in Austin, Texas?

    I could guess that first you tried this code in Windows NT, and later
    rebooted to Windows 98. Running your code on Windows 98 happened after
    6pm, your local time.

    By that time, I think it is already tomorrow in Greenwich, England
    (which is what gmtime provides). Try localtime instead (assuming your
    timezone is set correctly both in NT and 98).
    --
    TZOTZIOY, I speak England very best,
    Microsoft Security Alert: the Matrix began as open source.

    Comment

    • Stan Cook

      #3
      Re: Date issue Win98 vs NT

      Thanks!! You were right on with that one. I've been working on the program
      at home and work. At work with NT and 98 at home. I changed all of the
      gmtime references to localtime and everything came out correct.

      Thanks again....

      Stan
      "Christos TZOTZIOY Georgiou" <tzot@sil-tec.gr> wrote in message
      news:cb85gvgtf2 657aon58qu4p3qo rvfpbi79v@4ax.c om...[color=blue]
      > On Wed, 02 Jul 2003 03:50:10 GMT, rumours say that "Stan Cook"
      > <scook@elp.rr.c om> might have written:
      >[color=green]
      > >Has anyone else had this or a similar problem and is there a workaround?[/color]
      >[color=green]
      > >This piece of code:[/color]
      >[color=green]
      > >from time import gmtime, strftime
      > >_log = _log + "\\" + strftime("%m%d% y", gmtime()) + ".log"[/color]
      >[color=green]
      > >produces a file with the name 'today's date.log' on NT, but creates a[/color][/color]
      file[color=blue][color=green]
      > >called 'tomorrow's date.log' on Windows 98. I would really like to know
      > >why this happens. Any help offered is very much appreciated.[/color]
      >
      > Are you by any chance in Austin, Texas?
      >
      > I could guess that first you tried this code in Windows NT, and later
      > rebooted to Windows 98. Running your code on Windows 98 happened after
      > 6pm, your local time.
      >
      > By that time, I think it is already tomorrow in Greenwich, England
      > (which is what gmtime provides). Try localtime instead (assuming your
      > timezone is set correctly both in NT and 98).
      > --
      > TZOTZIOY, I speak England very best,
      > Microsoft Security Alert: the Matrix began as open source.[/color]


      Comment

      • Stan Cook

        #4
        Re: Date issue Win98 vs NT

        Thanks!! You were right on with that one. I've been working on the program
        at home and work. At work with NT and 98 at home. I changed all of the
        gmtime references to localtime and everything came out correct.

        Thanks again....

        Stan
        "Christos TZOTZIOY Georgiou" <tzot@sil-tec.gr> wrote in message
        news:cb85gvgtf2 657aon58qu4p3qo rvfpbi79v@4ax.c om...[color=blue]
        > On Wed, 02 Jul 2003 03:50:10 GMT, rumours say that "Stan Cook"
        > <scook@elp.rr.c om> might have written:
        >[color=green]
        > >Has anyone else had this or a similar problem and is there a workaround?[/color]
        >[color=green]
        > >This piece of code:[/color]
        >[color=green]
        > >from time import gmtime, strftime
        > >_log = _log + "\\" + strftime("%m%d% y", gmtime()) + ".log"[/color]
        >[color=green]
        > >produces a file with the name 'today's date.log' on NT, but creates a[/color][/color]
        file[color=blue][color=green]
        > >called 'tomorrow's date.log' on Windows 98. I would really like to know
        > >why this happens. Any help offered is very much appreciated.[/color]
        >
        > Are you by any chance in Austin, Texas?
        >
        > I could guess that first you tried this code in Windows NT, and later
        > rebooted to Windows 98. Running your code on Windows 98 happened after
        > 6pm, your local time.
        >
        > By that time, I think it is already tomorrow in Greenwich, England
        > (which is what gmtime provides). Try localtime instead (assuming your
        > timezone is set correctly both in NT and 98).
        > --
        > TZOTZIOY, I speak England very best,
        > Microsoft Security Alert: the Matrix began as open source.[/color]


        Comment

        Working...