SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / server / Questions

Questions[time](server)

Martin Hope
Vingtoft
Asked: 2017-01-07 04:48:19 +0800 CST

How to set system time dynamically in a Docker container

  • 42

Is there any way to set a Docker containers system time dynamically (at run time) without effecting the host machine?

Using

hwclock --set --date "Sat Aug 17 08:31:24 PDT 2016"

gives the following error:

hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.

Using

date -s "2 OCT 2006 18:00:00"

gives the following error:

date: cannot set date: Operation not permitted

Use case:

I need to test time sensitive software (behaviour depends on the date).

Other common use cases:

  • running legacy software with y2k bugs
  • testing software for year-2038 compliance
  • debugging time-related issues, such as expired SSL certificates
  • running software which ceases to run outside a certain timeframe
  • deterministic build processes.
time docker
  • 3 Answers
  • 67113 Views
Martin Hope
Jan Marek
Asked: 2012-03-06 00:31:50 +0800 CST

How to convert 'dmesg' time format to 'real' time format

  • 55

I have (for example) this log entry in dmesg output:

[600711.395348] do_trap: 6 callbacks suppressed

Is there a possibility to convert this 'dmesg' time to 'real' time to know, when this event happend?

ubuntu time dmesg
  • 6 Answers
  • 92742 Views
Martin Hope
Kyle Brandt
Asked: 2011-07-28 13:47:05 +0800 CST

How do I force sync the time on Windows Workstation or Server?

  • 118

What is the command to sync a Windows workstation or server to its configured time source?

windows time
  • 13 Answers
  • 1024505 Views
Martin Hope
Richard
Asked: 2010-06-15 08:04:17 +0800 CST

How do I get the current Unix time in milliseconds in Bash?

  • 335

How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?

time unix bash
  • 19 Answers
  • 518942 Views
Martin Hope
nicoulaj
Asked: 2010-05-05 02:56:09 +0800 CST

Faking the date for a specific shell session

  • 42

I'm certainly trying to achieve something weird here, but I want to fake the date locally for a shell session on GNU/Linux. I need to black-box test how a program behaves at different dates, and modifying the system-wide date can have unwanted side effects (cron jobs, messed up logs, etc).

Any ideas ?

linux time unix shell unix-shell
  • 4 Answers
  • 19184 Views

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    Can you pass user/pass for HTTP Basic Authentication in URL parameters?

    • 5 Answers
  • Marko Smith

    Ping a Specific Port

    • 18 Answers
  • Marko Smith

    Check if port is open or closed on a Linux server?

    • 7 Answers
  • Marko Smith

    How to automate SSH login with password?

    • 10 Answers
  • Marko Smith

    How do I tell Git for Windows where to find my private RSA key?

    • 30 Answers
  • Marko Smith

    What's the default superuser username/password for postgres after a new install?

    • 5 Answers
  • Marko Smith

    What port does SFTP use?

    • 6 Answers
  • Marko Smith

    Command line to list users in a Windows Active Directory group?

    • 9 Answers
  • Marko Smith

    What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

    • 3 Answers
  • Marko Smith

    How to determine if a bash variable is empty?

    • 15 Answers
  • Martin Hope
    Davie Ping a Specific Port 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    Smudge Our security auditor is an idiot. How do I give him the information he wants? 2011-07-23 14:44:34 +0800 CST
  • Martin Hope
    kernel Can scp copy directories recursively? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh returns "Bad owner or permissions on ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil How to automate SSH login with password? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin How do I deal with a compromised server? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner How can I sort du -h output by size 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent How to determine if a bash variable is empty? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus How do you find what process is holding a file open in Windows? 2009-05-01 16:47:16 +0800 CST

Related Questions

Trending Tags

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve