When using DateTime.now, does the “now” method return the time based on the remote OS system time or the local time where the user actually invoked the “now” method, if they are using ssh and running the commands in a rails console, for example?
When using DateTime.now, does the "now" method return the time based on the remote OS system time or the local time where the user actually invoked the "now" method, if they are using ssh and running the commands in a rails console, for example?
It returns the time on the machine that is running the code, so if they ssh into a machine to run it then it is the time on the machine ssh'ed into. How could it be otherwise? The machine ssh'ed into does not know anything about the client machine's time settings.
Colin