Questions tagged [systemtime]

In computer science and computer programming, system time represents a computer system's notion of the passing of time.

171 questions
1
vote
3 answers

C# 2.0 specific timezone

I am working on a legacy application in .NET 2.0 and I want to convert time from local time (which happens to be UTC+1) to the time in Brazil (that is "E. South America Standard Time" as Windows calls it) and back. I put together this code that I…
HH321
  • 502
  • 1
  • 6
  • 20
1
vote
2 answers

Get system time with BIOS interrupt in assembly

I want to get the time(hours, minutes, second) with the interrupt INT 1Ah/AH = 00h. I know that it keeps in CX the High-order part of clock count and in DX the Low-order part of clock count. I searched about it, and found the…
Tom
  • 171
  • 1
  • 3
  • 14
1
vote
1 answer

MersenneTwister random number generator

I have a list(with 100.000 data) and i want to choose 4000 of them using MersenneTwister. I also want to use current system time because i run 15 times the program and i need different number of times. MersenneTwister mt = new…
Lee Yaan
  • 547
  • 7
  • 26
1
vote
1 answer

Windows 10 error 740 with child processes, trying to adjust system time

So I got some child processes that need to be able to adjust System time on a windows 10 system. The way it has been done in the past iterations of Windows was simply forking children as Administrator so they would have permission to edit the system…
Teddd73
  • 11
  • 1
1
vote
2 answers

Change system time programmaticaly using datetimepeaker

I am trying to change system date and time using the following C# code. But the result is no change is occuring in systemdate(no error is thrown either). I tried by uncommenting the commented portion of the code too. But no effect. :( Afterward I…
1
vote
3 answers

Docker Container: time/timezone wrong

I am in a running docker container with node and for some reason the timezones / the time of the host machine vs inside the docker container never line up: root@foobar:~# node -e "console.log(new Date())" >> Tue May 17 2016 15:12:43 GMT+0200…
Patrick DaVader
  • 2,133
  • 4
  • 24
  • 35
1
vote
2 answers

MS SQL 2005: Any way to temporarily set the system date for a T-SQL script to a different date?

We have a bunch of T-SQL scripts dependent on today's date and when they run. If one doesn't run on the week it should, we end up temporarily setting the system time a day before, run the script, then set it back. Is there anyway to temporarily set…
Zachary Scott
  • 20,968
  • 35
  • 123
  • 205
1
vote
2 answers

How to make Java point to a different (Custom) Date/Time other than System Date/Time?

I have this scenario at my work where I need to run my java Application with JAVA made to believe that date/time is somewhere in the future. Team has been doing this my changing the System time and restarting the WebSphere Application Sever to…
Sunny
  • 11
  • 1
1
vote
1 answer

how to get current date and time in visual studio 2008?

I am trieng to get the current date and time in my website. I am using the following function to get date and time. Response.Write( DateTime.Now.Date ); I am getting the date properly but for the time I am getting as 12:00 AM . Please someone tell…
Arrow
  • 321
  • 1
  • 7
  • 19
1
vote
0 answers

How to add certain number of seconds to Sys.time()?

I was able to get current system time in R using Sys.time() as follows > Sys.time() [1] "2015-07-10 13:03:21 PDT" But how can I add a certain number of seconds, say 5 seconds so the time would look like "2015-07-10 13:03:26 PDT" Or maybe add 90…
tubby
  • 2,074
  • 3
  • 33
  • 55
1
vote
1 answer

How do I set the windows system clock to the right local time using C++?

Right now I do something like this: SYSTEMTIME st; st.wHour = 6; st.wMinute = 23; BOOL result = SetSystemTime(&st); The goal is to get it to show that exact time on my local machine. When I run the program it changes it to 8:23…
Brian T Hannan
  • 3,925
  • 18
  • 56
  • 96
1
vote
2 answers

Error when parsing system time through SimpleDateFormat

I'd like to get the current system time, and then parse it through a formatter SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");. I get .... error : java.text.ParseException: Unparseable date: "Tue Jan 13 17:05:51 PST 2015"…
Program-Me-Rev
  • 6,184
  • 18
  • 58
  • 142
1
vote
1 answer

Getting time for cocos2dx game

I have a question. I'm developing the game which has lives. The main point is lives can resurrect after each 5 minutes. If I want to make that, I have to get time for algorithm. BUT... I know many ways to get system time, but the problem is user can…
Eugene Alexeev
  • 1,152
  • 12
  • 32
1
vote
1 answer

Setting the system time of JVM

I have a java app which runs on a linux/unix machine. When setting the system time via system command, on the console using date I see that the date/time has changed, but it seems as my JVM didn't recognize this change. It seems that this is not a…
Rolf
  • 85
  • 1
  • 6
1
vote
1 answer

SetSystemTime always add hour depending on Timezone

import win32api win32api.SetSystemTime (timetuple[0], timetuple[1], timetuple[6],timetuple[2], timetuple[3], timetuple[4], timetuple[5], 0) I use this code to change system time on windows. But when i run this code it will automatically add +8…
unice
  • 2,655
  • 5
  • 43
  • 78