Most voted "time" questions
Use this tag when the question refers to some resource, information or function-related problem for calculating or manipulating time variables.
Learn more…109 questions
Sort by count of
-
1
votes1
answer562
viewsHow to adjust the format dd/mm/yyyy
I have the following code that takes the instant date from the computer. #include <Windows.h> #include <stdio.h> #include <time.h> void main () { time_t t = time(NULL); struct tm…
-
1
votes1
answer662
viewsComparison of Mysql hours
I have an agenda where I register an appointment, that commitment has Hora Inicial and Hora Final. However now when I register a new appointment I have to make a check to see if the hours are not…
-
1
votes1
answer350
viewsDisplay an alert when the event is 5 minutes away
I am developing an agenda in Java, where I have in the database the date and time saved. However, what would be the best way to display an alert 5 minutes before the event? Do I have to run the…
-
1
votes2
answers104
viewstime() Function php
I am paying for some purchases that have specific dates, and when I step as parameter a date should be < that date("Y-m-t", time() + 14*24*60*60), that in case it would have to be 2 weeks, it…
-
1
votes1
answer173
viewsError picking up Time type data from database
I am making a query but it is giving error when I try to get values of type Time. This is the error: java.sql.Sqlexception: java.sql.Sqlexception: Bad format for Time '13:00:00.000' in column 5 The…
-
1
votes1
answer1297
viewsSet Timezone in Codeigniter
I have a website, that in the news it automatically registers the date and time, only when I register, the registered time is 3 hours early. I’m thinking it must be some Codeigniter Timezone setup,…
-
1
votes2
answers1136
views -
1
votes1
answer2231
viewsHow to subtract two dates using Ruby and the Time library?
That is the code: require 'time' t = Time.parse('2016-04-18') #data de ontém t2 = Time.now #data atual t3 = t2 - t # subtração das duas variáveis(datas) acima puts Time.at(t3) #resultado da…
-
1
votes2
answers943
viewsAdding Hours greater 24 h
The sql statement returns me the time type hours: | Horas | |20:52:00| |12:42:00| |09:00:00| |07:45:00| I would like to add the total hours, but that way he is "zeroing" when it reaches 24 hours.…
-
1
votes1
answer55
viewsServer with intermittent time
I have an external PHP server that has generated some time problems, sometimes it generates the correct time (eg: generates 17:00 to 17:00) and other times it generates with two more hours (ex:…
-
1
votes1
answer3365
viewsWrite linux bash exits to a file
I need to do some tests on the linux command line, but doing all the tests is very time consuming, someone can help me, if you have, to write code in shell script to run all the tests, and record…
-
1
votes1
answer89
viewsConversion to int with static_cast in c++
Doing a search found something related to this error. I have the following error below: ERROR: date.Cxx: In Member Function ːint Currentdatetime::Getmonth(const string&)': date.Cxx:125:18:…
-
1
votes1
answer103
viewsError inserting date in sprint in jira
When I try to start my sprint this error appears in jira…
-
1
votes1
answer478
viewsPassing string to team
I’m taking 2 strings in the format hh:mm:ss to then calculate the time spent between them in days, hours, minutes and seconds format. I have already split and have all fields separated into their…
-
1
votes3
answers5196
viewsHow to set up a timer in Android Studio to perform tasks at constant intervals?
I am developing a simple application with Android Studio and need to create a timer to run some methods every 1 second. I tried it this way but it didn’t work: int delay = 1000; int interval = 1000;…
-
1
votes1
answer30
viewsHow to check the Windows time zone in real time using Python?
I’m trying to get the time zone of the system in real time using Python, I made the code below: import tzlocal tzlocal.get_localzone().zone The problem is, by changing the Windows time zone, the…
-
1
votes2
answers84
viewsRandom Doubt and Periodic Activities in Golang
Is there any way I can get one executed fmt.Printf(choosenCity) every 6 hours and, at each run, he chooses a different element of the Array? I even managed to get him to perform periodically after a…
-
1
votes1
answer73
viewsCalculate price per minute
I need to calculate the price from a starting time, for example the first 30 minutes after the entry costs R$30, after this period each minute needs to add R$1.50: 30 minutes = R$30,00 Additional…
-
0
votes1
answer273
views -
0
votes1
answer758
viewsFreeze Windows clock
It would be possible to freeze the Windows clock with Python? If so, which library does it?
-
0
votes1
answer267
viewsUsing double type in c++ can be "faster" in terms of running time than using floats?
I have a program developed in c++ in visual studio, which processes a huge amount of data! This program can use both float and double type data, and this specification is made as follows: typedef…
-
0
votes2
answers376
viewsHow to include "time" library in the compiler?
I am compiling in C on my Mac by terminal, this all a wonder, the only problem is that when I need to call a new library I don’t know what the command to call it by terminal. Ex: #include…
-
0
votes1
answer1020
viewsCalculate the number of hours between two hours and turn into float
I needed to create a function that received two hours in the format (00:00:00), calculate the number of hours between them, and convert me to float. However the float would be of this genre:…
-
0
votes1
answer32
viewsSelect - Time comparison does not work
I am trying to make a query to eliminate results in which the end time of the event is equal to 00:00:00, I made the query this way: select nome, local, hora_inicio, hora_fim, data_inicio, data_fim…
-
0
votes0
answers21
viewshelp with time handling in Time with php
I have a code where I store in the database the time of posting in time format and I want to show the time of posting in the format "posted to 1 day" for example, the hour, minutes and seconds I…
-
0
votes1
answer796
viewsrestrict options for type="date" and type="time" fields
I am making a scheduling form. The company is not 24 hours and does not work every day of the week. In this case I need to narrow the options according to the company calendar. I thought to validate…
-
0
votes3
answers1087
viewsHow to put default value in time field in mysql?
I searched the web but I did not find anything specific for time field in mysql, only date and timestamp, I am creating a field "hora_emissao" type "time", because I want to store only the time in…
-
0
votes1
answer1042
viewsTransforming string in time in Javascript
I am developing an application in Vuejs and on a screen I have two input’s of hour and are being saved in Mongodb as String. However the input only accepts in the time format and when I click on the…
-
0
votes1
answer99
viewsCreate an int variable that recognizes numbers in time format
I have a variable int that is taking the current time of android and comparing with more dua variables int of my database in the parse that contains the opening and closing time of a company, in…
-
0
votes4
answers244
viewsSet a range in the execution of each for loop
I am wanting to set an interval in the execution of each loop of my for var li = document.getElementByTagName("li"); lengthLI = li.length; for(var x = 0; x < lengthLI; x++){…
-
0
votes1
answer44
viewsHow do I manipulate team values in my JS?
I need to perform a calculation with input values like time in my JS using jquery, how do I do that? is there any library ready? <label for="">Inicio</label> <div…
-
0
votes3
answers781
viewsPrinting schedules at predetermined intervals
I’m trying to make a code that will print the hours in a certain interval. <?php //Array com os horarios que possam ser imprimidos $hora =…
-
0
votes0
answers445
viewsStore the time of an input type Time field in a Time type column
I am working on a website that schedules real estate surveys, and I need to store in Mysql the time the person requested the visit. I am using an HTML input field of the Time type. The field in the…
-
0
votes2
answers155
viewsLogic - Knowing if you are on the second day of the month
I’m having difficulty formulating a logic to know whether or not the day I’m on is for example the second Saturday of the month of February. With the code I made I can take the day I am, month and…
-
0
votes1
answer55
viewsMake Toast disappear while running root command
Long live, I have my phone connected to the computer and when I run root commands by the adb, a Toast always appears in the middle, is there any way to make these toats disappear? I remind you that…
-
0
votes1
answer93
viewsBrowser Guide / Title Blink when Reaching Given Time
I have the following code: function startTimer(duration, display) { var timer = duration, minutes, seconds; myInterval = setInterval(function () { minutes = parseInt(timer / 60, 10) seconds =…
-
0
votes1
answer324
viewsHow to use Sleep for a Tkinter graphical interface loading effect
I’m willing to use the Sleep module team provides a load/wait effect on checking a condition. No use of Tkinter, the effect works perfectly, however, when I try to do the same with the Label of…
-
0
votes1
answer59
viewsJavascript clock increment for game
I am creating a JS team to count the time it will take the user to complete the task. I am using setInterval() to run the team but I’m not able to increase to more than (1) the value of min(). This…
-
0
votes0
answers309
viewsServer with correct time, but PHP with early time
My server (Cent OS) is at the correct time (10:10 hours I am creating the post), but in PHP when I give the command echo date('H:i') the result is 11:10 (an hour early). I don’t know what might be…
-
0
votes1
answer60
viewsDisplay runtime of an application [C#]
I would like help with a process I need to do: The idea is to create an informative label that will contain as many hours, minutes and seconds as my application is working. Time starts to count as…
-
0
votes1
answer37
viewsMy script looking for a string in another string is taking too long
My script loads the command1(file1) and saves the first column of all rows in an array, later it will search for each substring of that array in a 2(from command2) file. The problem is that file 1…
-
0
votes2
answers264
viewsconvert minutes to : hours and minutes
Have 150 minutos; how to convert it to stay 2h30min? For example, I was able to do a conversion using the code below, but it will return 2.55 where’s the mistake ? $minutos = 150; if($minutos >…
-
0
votes1
answer30
viewsRegister exact time in the comic
Good morning, I’m a beginner programmer, and I’m developing a sales web app, where I need to insert in the comic the exact time of sale, but I’m not getting. Javascript code that generates real-time…
-
0
votes1
answer104
viewsSubtract 4 times and display at the same time the result in another input
I am with this doubt of how I will take these 4 fields (Time start, end and interval start and end) and subtract them and appear the answer in another input in the weekly workload. The code is this…
-
0
votes1
answer67
viewsIonic time Picker Usability
Good evening guys, I’m trying to implement this Picker date in Ionic, but it’s not working. Has anyone ever used it ? Or does anyone know a 24-hour format? Link:…
-
0
votes2
answers1092
viewsI can’t sync my windows clock
I installed windows yesterday(2019-08-16), and the time of the OS appears 3 hrs ahead, I try to synchronize and nothing. Type in the CMD >w32tm /resync /rediscover Enviando comando resync para o…
-
0
votes1
answer174
viewsFormat conversion 0001-01-01T00:00:00Z from time field. Time
I’m using the ORM Gorm for a project, and in the columns referring to the dates, according to documentation, it is necessary to set the type team. Time in Structs fields that abstract dates. The…
-
0
votes0
answers37
viewsUse only hours, minutes and seconds on a graph
I’m trying to use the time variables (hour, minute and second) that are organized in columns to make a graph. In addition I have information every 1 second and I need it every 1 minute so I cut the…
-
0
votes0
answers16
viewsCheck time interval in another time interval (java)
Given a time frame, I need to know how many hours are longer than 22:00 and shorter than 05:00 LocalDateTime entrada1, saida1, entrada2, saida2, entrada3, saida3; entrada1 =…
-
-1
votes1
answer437
viewsWhat is the best database to store a list of information
I am thinking of developing a project, in this case a website. I will need to have a database connection, I will opt for the mysql. On the site people could create an account, and later create a…