In computer science and computer programming, system time represents a computer system's notion of the passing of time.
Questions tagged [systemtime]
171 questions
2
votes
0 answers
System time is changed automatically for some unknown reason on Linux machine
There's a very weird problem about system time on one of my Linux machines, the system time is kept being changed to 40 seconds ahead of my local time automatically by something. No matter what time I reset, it'll be changed a couple seconds later,…

shizhz
- 11,715
- 3
- 39
- 49
2
votes
3 answers
Why does my method sometimes print multiple lines?
So I Have this method
public int sumMathRandomAndSystemTime(){
n = 1 + ((int) (Math.random() * 10)+
(int) (System.currentTimeMillis() % 10));
if(n > 10){
sumMathRandomAndSystemTime();
}
System.out.println(n);
…

Jorge Padilla
- 67
- 9
2
votes
0 answers
How to move system date time in spring boot for testing scheduler scenario?
In our scheduler application, we are using quartz scheduler with Spring Boot scheduler which reads System.currentTimeMillis().
Spring boot version is 1.3.5.
We are able to test scenarios like weekly, monthly, yearly by creating cron expression w.r.t…

SUMIT
- 540
- 1
- 4
- 19
2
votes
2 answers
Can a batch file change the system date; save file with attributes; change date back to current date?
Can a batch file change the system date; save file with attributes; change date back to current date?
Goal to save MYFILE.TXT with the date of 01-01-2010
using Batch commands.
I have tried to set date=01-01-2010
and then save the file, but it didn't…

Edoctoor
- 183
- 1
- 3
- 11
2
votes
1 answer
When scala.concurrent.Future's execution starts?
Of course one could collect the system time at the first line of the Future's body. But:
Is it possible to know that time without having access to the future's code. (In my case the method returning the future is to be provided by the user of the…

Developer
- 193
- 1
- 11
2
votes
0 answers
Create specific FILETIME struct in C++
I've done research on MSDN and this site relating to my question, but have been unsuccessful in finding a specific, non-hacky solution.
I would like to have the ability to create specific UTC FILETIME struct in C++. The user has the ability to…

fowlball1010
- 343
- 3
- 13
2
votes
1 answer
How to implement timer callback independent of the system time in C++ using boost
I need to create a timer which will call my function periodically (e.g. every 50ms).
BUT the problem is I will need to change the system time while the timer is running.
I would like to do this using boost so that the code is portable. Otherwise I…

Miro Bucko
- 1,123
- 1
- 13
- 26
2
votes
1 answer
Generate time serie in iso-8601 format using date command, how to deal with server system date origin offset?
I have the following bash function that generate an epoch list in iso-8601 format on a machine that runs ubuntu and it works fine. (where isdate and isint bash functions to test the input)
gen_epoch()
{
#@ USAGE: gen_epoch [start_date_iso]…

marcell
- 1,498
- 1
- 10
- 22
2
votes
1 answer
Does the System logger use computer resources?
I want to launch an applet with sandbox permissions but it accesses System time and I has a system logger which am not sure can run in a protected view.

Polly
- 21
- 3
2
votes
4 answers
Prevent endline after printing system time
I have a a simple question, if I want to print a value on the same line as the output of my system time, is this possible?
char *date;
time_t timer;
timer=time(NULL);
date = asctime(localtime(&timer));
//printf("Current Date: %s", date);
…

c0d3rz
- 649
- 3
- 15
- 23
2
votes
1 answer
Check if the current time falls within defined time range on UNIX
Consider the below PSUEDO-CODE:
#!/bin/ksh
rangeStartTime_hr=13
rangeStartTime_min=56
rangeEndTime_hr=15
rangeEndTime_min=05
getCurrentMinute() {
return `date +%M | sed -e 's/0*//'`;
# Used sed to remove the padded 0 on the left. On…

Kent Pawar
- 2,378
- 2
- 29
- 42
1
vote
3 answers
Time elapsed increases in debugging?
I'm using time elapsed as a variable in a program which I am currently debugging. As I am debugging this the time elapsed variable still increases whilst I am examining variables giving undesired results and makes debugging ineffective. Is there…

John
- 1,566
- 6
- 17
- 28
1
vote
0 answers
How would I get the current time in ASM using GetSystemTime?
Today I'm solving this problem in assembly lang: "Output the time and date using the GetSystemTime function.
Output format:
Date: 22 вересня 2007 року
Time: 17:05:35
Day of the week: Thursday
Pay attention to the time zone and indents in the…

Sollpix
- 49
- 5
1
vote
1 answer
How to Run GLSL Program Based on System Time
I am trying to run different iterations of a shader program based on system time. I am hoping to set up an if else code to run one iteration of the program during the day and another at night. At the moment, I can't find how to bring system time…

futuregoby
- 11
- 2
1
vote
2 answers
timedatectl and systemd-timesyncd services fail to set time
TL;DR: My raspberry pi won't automatically sync date and time. timedatectl doesn't run/times out, and upon further investigation, systemd-timesyncd has failed for some reason and cannot be restarted. I also don't have any error logs because the…

DBurca
- 21
- 1
- 5