anyway to set time? - Protocols

This is a discussion on anyway to set time? - Protocols ; I have here an odd project that I don't think is possible, but I'm going to ask anyway. With the K95 2.1.3 commands, is there a way to set a date rather than rely on the computer's time? Theres slightly ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: anyway to set time?

  1. anyway to set time?

    I have here an odd project that I don't think is possible, but I'm going to
    ask anyway.

    With the K95 2.1.3 commands, is there a way to set a date rather than rely
    on the computer's time? Theres slightly over a dozen functions, variables
    and basic commands used to display the date in a multitude of ways. But can
    you set it inside K95? I'm looking to trick K95 into thinking it was the day
    before.

    Local users can't change the computer's date. Access restricted and thats
    not going to change. I really don't want the users doing that anyway every
    single day.



  2. Re: anyway to set time?


    Scott Caissie wrote:
    > I have here an odd project that I don't think is possible, but I'm going to
    > ask anyway.
    >
    > With the K95 2.1.3 commands, is there a way to set a date rather than rely
    > on the computer's time? Theres slightly over a dozen functions, variables
    > and basic commands used to display the date in a multitude of ways. But can
    > you set it inside K95? I'm looking to trick K95 into thinking it was the day
    > before.
    >
    > Local users can't change the computer's date. Access restricted and thats
    > not going to change. I really don't want the users doing that anyway every
    > single day.


    I suggest you try the date command,
    first look at K95>help date.
    It would seem thet the command K95>date -1 day
    gets pretty close to what you want.
    I'm assuming you want to integrate this into some kind
    of script?
    Regards...Dan.


  3. Re: anyway to set time?

    On 2006-05-17, Scott Caissie wrote:
    : I have here an odd project that I don't think is possible, but I'm going to
    : ask anyway.
    :
    : With the K95 2.1.3 commands, is there a way to set a date rather than rely
    : on the computer's time? Theres slightly over a dozen functions, variables
    : and basic commands used to display the date in a multitude of ways. But can
    : you set it inside K95? I'm looking to trick K95 into thinking it was the day
    : before.
    :
    : Local users can't change the computer's date. Access restricted and thats
    : not going to change. I really don't want the users doing that anyway every
    : single day.
    :
    It seems you are asking for a way for Kermit to apply an offset to the
    date-time returned by queries to the system. The answer is yes, but you
    have to do it explicitly. \v(timestamp) is the Kermit variable that returns
    the current date and time (as obtained from the system). At the point at
    which you obtain this, you can apply the desired offset, e.g.:

    .now := \fcvtdate(\v(timestamp) -1day)

    But of course each time you fetch the date, you would have to do it again.
    There is no way to tell Kermit to set a given internal date/time and use
    it instead of the one returned by the system, transparently to the rest of
    the script. But you could come close by making your own function:

    define mytimestamp { return \fcvtdate(\v(timestamp) -1day) }

    and then anywhere you want to get the adjusted current date/time, refer to
    \fexec(mytimestamp) rather than \v(timestamp).

    - Frank

  4. Re: anyway to set time?

    Ya, I already have a specific method for retrieving a modifying a date via a
    script.
    "There is no way to tell Kermit to set a given internal date/time and use
    > it instead of the one returned by the system" This is what I was trying to
    > do. I figured there was little hope in that. I was hoping that my Terminal
    > Emulation would retrieve a modified local time and use it. The problem is
    > that we work past midnight. I wanted to try a possible quick fix so that
    > it picks up yesterdays date.



    "Frank da Cruz" wrote in message
    news:slrne6mctb.kea.fdc@sesame.cc.columbia.edu...
    > On 2006-05-17, Scott Caissie wrote:
    > : I have here an odd project that I don't think is possible, but I'm going
    > to
    > : ask anyway.
    > :
    > : With the K95 2.1.3 commands, is there a way to set a date rather than
    > rely
    > : on the computer's time? Theres slightly over a dozen functions,
    > variables
    > : and basic commands used to display the date in a multitude of ways. But
    > can
    > : you set it inside K95? I'm looking to trick K95 into thinking it was the
    > day
    > : before.
    > :
    > : Local users can't change the computer's date. Access restricted and
    > thats
    > : not going to change. I really don't want the users doing that anyway
    > every
    > : single day.
    > :
    > It seems you are asking for a way for Kermit to apply an offset to the
    > date-time returned by queries to the system. The answer is yes, but you
    > have to do it explicitly. \v(timestamp) is the Kermit variable that
    > returns
    > the current date and time (as obtained from the system). At the point at
    > which you obtain this, you can apply the desired offset, e.g.:
    >
    > .now := \fcvtdate(\v(timestamp) -1day)
    >
    > But of course each time you fetch the date, you would have to do it again.
    > There is no way to tell Kermit to set a given internal date/time and use
    > it instead of the one returned by the system, transparently to the rest of
    > the script. But you could come close by making your own function:
    >
    > define mytimestamp { return \fcvtdate(\v(timestamp) -1day) }
    >
    > and then anywhere you want to get the adjusted current date/time, refer to
    > \fexec(mytimestamp) rather than \v(timestamp).
    >
    > - Frank




+ Reply to Thread