On 15 June 2016 at 16:36, Eike <[email protected]> wrote:
>
> sorry, I meant to write `sudo date +%Y%m%d -s "20180210`.
>
> Eike <[email protected]> writes:
>
>> Hello NixOS experts,
>>
>> I want to test applications if they would work some time in the future
>> and so I thought to change the date using timedatectl. But it says that
>> it is not possible to use it on NixOS. The date command also doesn't
>> seem to work: the date/time is not changed after doing for example `sudo
>> date +%Y%m%d "20180210"`.
>>
>> How can I temporarily set the system time some value?

Your command works for me. ("date" returns the new date.) But for
testing purposes, I'd have a look at faketime instead: nix-env -iA
nixos.libfaketime.
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to