Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

I'd like to transform -238204800 seconds to "1962:06:15 00:00:00", using python 3.8. My code is : from time import strftime, localtime secs = -238204800 print(strftime("%Y:%m:%d %H:%M:%...
Eric H.'s user avatar
  • 2,279
-1 votes
3 answers
184 views

I'm currently migrating my codebase from Joda-Time to the java.time API (Java 8+). In one part of my application, I schedule tasks to run at a specific time either today or tomorrow, depending on ...
dragon4's user avatar
  • 11
0 votes
2 answers
111 views

I have created an ALL SERVER FOR LOGON trigger in my MS SQL Server 2019 Dev Edition to keep track of login activity. The activity is stored in a database table SYS_UNF_TRAIL that includes the ...
altink's user avatar
  • 375
2 votes
2 answers
79 views

I have several local time points: import datetime from zoneinfo import ZoneInfo as zi wmr = datetime.time(hour=12, tzinfo=zi("GMT")) ecb = datetime.time(hour=14, minute=15, tzinfo=zi("...
sds's user avatar
  • 60.5k
0 votes
1 answer
58 views

First off, NodaTime seems like a really well thought out, full featured package, kudos. Question, maybe I am missing something, but can Duration be mixed with LocalTime in anyway? I need to do some ...
Michael W. Powell's user avatar
1 vote
1 answer
151 views

I have similar issue to this.There is no solution there and I am not working with JSON mapping. LocalTime.parse on time string is removing second part. I have put the test code below. Any suggestion? ...
αƞjiβ's user avatar
  • 3,276
1 vote
0 answers
67 views

I have variables in a dataset that give me longitude[:], latitude[:], time[:] and localtime_at_0[time]. localtime_at_0 only tells me which longitudes are experiencing midnight. However, I'd like to ...
Maz's user avatar
  • 11
0 votes
1 answer
55 views

C++ will let me get the local time with std::localtime(), but that presents a problem when I'm using an online compiler whose server is in a different continent. How do I get the time in PST instead ...
Samuel van der Veen's user avatar
0 votes
3 answers
2k views

I am getting the date from backend, and the date is stored in UTC format but I want it in local timings or IST Didn't get anything relevant. You find my code below, datetransform also didn't work <...
Kuber S's user avatar
  • 11
0 votes
1 answer
68 views

Clock on tkinter doesn't work I created a weather app, but the clock just constantly stand still the time, how to fix it??? current = datetime.now(home) real = current.strftime("%d/%m/%Y\n%H:%M:%...
PythonLover1878's user avatar
1 vote
1 answer
950 views

I am trying to parse string "2023-05-10 09:41:00" to LocalTime using java.time library. When I try LocalTime.parse("2023-05-10 09:41:00", DateTimeFormatter.ISO_LOCAL_DATE_TIME) I ...
mars8's user avatar
  • 1,346
0 votes
4 answers
2k views

I am trying to convert UTC time to local time, including daylight saving. Localtime (Stockholm), in summer, should be 2 hours ahead of UTC, but when I convert it in Java it only adds one hour. public ...
Pacmyc's user avatar
  • 51
3 votes
1 answer
147 views

I have a project on Jetpack Compose where I need to make a Wheel time picker to choose the time. I found a solution that looked acceptable. https://github.com/commandiron/WheelPickerCompose Then I got ...
Alex20280's user avatar
  • 385
-2 votes
3 answers
1k views

I have the date 2023-04-03 and wanted to convert it into UTC time with range (start and end of the day) 2023-04-03T00:00:00 -> 2023-04-02T18:30:00z 2023-04-03T24:00:00 -> 2023-04-03T18:30:00z ...
Anuj kumar's user avatar
-1 votes
1 answer
137 views

The original time value stored in my cassandra DB is : 11:43:00.000000000 I am trying to fetch it in my JSON response as : 11:43:00 What I am getting is: 11:43 What I have tried so far in my model ...
Soumav's user avatar
  • 403
2 votes
3 answers
908 views

I have a function that needs to calculate yesterday's, today's and tomorrow's date. I use localtime to get today's date. I add 1 to tm_mday in order to get tomorrow's date. The issue is if the current ...
Tyler's user avatar
  • 73
0 votes
1 answer
686 views

I have used the following code to get time and date in India, but the time i get is not the right time. #include <time.h> #include <stdio.h> int main() { struct timespec ts; struct tm ...
Jag Mohan Ray's user avatar
2 votes
2 answers
827 views

I'm trying to print out the local time on my computer using C' localtime() function; The default format of my locale is mm/dd/yyyy, so The expected output is: 03/04/2023 12:51:43 But I get: 04/02/2023 ...
moisedk's user avatar
  • 58
1 vote
1 answer
163 views

I am building a Calendar app to save events, show them and edit them with DatabaseHelper. I want to add alarm to these events but every I can find only setting alarm with Calendar import library. I ...
Chris Damianidis's user avatar
0 votes
1 answer
166 views

From server I'm getting timestamp like this: " 2022-12-21 16:47:10 ". And I want to convert this time to local time zone, depends on client. E.g. 16:47:10 in Poland was 10am in US. Any ideas ...
Raf1k's user avatar
  • 51
0 votes
1 answer
103 views

I'm writing a server in C that is meant to get a request over UDP for the time in either: Doha, Prague, New York or Berlin. How can I produce the right response? I tried looking into the localtime() ...
Elad Moshe's user avatar
1 vote
1 answer
588 views

Why is the value set to 1 hour behind? If Europe/Dublin or Europe/London is same offset as UTC, why is the value in db different to originating JVM value? JVM: Europe/Dublin - TimeZone.getDefault()....
bobbyrne01's user avatar
  • 6,833
2 votes
3 answers
115 views

I want the user to input hours and minutes for a Local.Time from 00 to 23 and from 00 to 59, I scanned this as an int. It works but for values from 00 to 09 the int ignores the 0 and places then as a ...
Daleo dorito's user avatar
-2 votes
1 answer
286 views

I have a problem to create a query which gives back all value where time is between two parameter. How can I get back those works where endTime time part is between the given LocalTime-s? public class ...
Gabor's user avatar
  • 73
1 vote
1 answer
514 views

I'm trying to set a localtime to my docker container as the same as my localtime locally to use on a spring-boot application when save a data. spring-boot app: ... cpoWorkflowExecution.setStartDate(...
Aldo Inácio da Silva's user avatar
-1 votes
1 answer
53 views

So, I am currently working on a function that checks if a given LocalTime is inside a range. All good, and the equivalent for LocalDateTime works without an issue. So, my code right now looks like ...
Ricardo's user avatar
  • 197
0 votes
0 answers
263 views

#define _CRT_SECURE_NO_WARNINGS //Suppresses warnings that will block the complier. #include <iostream> #include <iomanip> #include <string> #include <Windows.h> #include <...
rochelle watkins's user avatar
1 vote
1 answer
152 views

I have departure time - 02:00, arrival - 06:15, and on the way - "on the way 4h 15m". I want to calculate whether the travel time is counted correctly HTML <div class="wl-...
EYE's user avatar
  • 13
0 votes
1 answer
359 views

char datetime[DATETIME_LEN]; time_t timer; struct tm* tm_info; timer = time(NULL); tm_info = localtime(&timer); // debug: tm_info: 0xcccccccccccccccc {tm_sec=??? tm_min=??? tm_hour=??? ...} if (...
cxↄ's user avatar
  • 1,388
1 vote
0 answers
42 views

I am new to C# so please excuse me if the question is too simple, I tried the code below and it didn't work I tried: //-- Local Time I want to convert DateTime eventDate1 = new DateTime(2020, 03, 21, ...
danato61's user avatar
4 votes
2 answers
2k views

What is the correct and easiest way to get the duration between a time string and actual time in Kotlin? I have following time strings (timeStr): "18:00:00" At the end I like to have a ...
mepi0011's user avatar
0 votes
0 answers
68 views

We have encountered a problem where we need to use local time zones on application servers and the RDS database (Oracle, MySQL, Postgre). Jamaica uses UTC-5 and never observes DST, while the rest of ...
khalidmehmoodawan's user avatar
0 votes
1 answer
707 views

I'm building a simple small program for fun, to kill time and learn something. I simply want my program to display local time (I live in Buffalo, NY, so I'm in ET). I put together an ostensibly ...
AndrewGreen's user avatar
-2 votes
2 answers
920 views

So this Publish time is a datetime in UTC that is retrieved from my database, it is currently in UTC and I need to change it to local time and then display the local time on my LineChartDataSet
user avatar
1 vote
2 answers
3k views

I noticed a weird behavior of my application on an ESP32. After some "debugging" I think the issue is due to this function: bool getLocalTime(struct tm * info, uint32_t ms) { uint32_t ...
Mark's user avatar
  • 5,355
1 vote
1 answer
1k views

I am trying to get the local time in seconds (unix epoch) when a timezone is set. For e.g. 1643371200 is 2022-01-28 12:00:00 with UTC0 this can be read via gettimeofday(tv, NULL) as seconds with the ...
ddomnik's user avatar
  • 73
3 votes
2 answers
562 views

As you know the <time.h> standard header defines the struct tm and a function called localtime. Does localtime make a heap allocation? Or is it allocated in the stack? It returns a pointer but ...
triangleboi's user avatar
0 votes
0 answers
34 views

I am using following to get HH:MM format for time in my pojo: @DateTimeFormat(pattern = HTConstants.TIME_FORMAT) private LocalTime checkOutTime; But it returns HH:MM:SS. Any other ways to do ...
Stotra's user avatar
  • 103
0 votes
0 answers
275 views

I am having DB chema with Time type: [localTime] [TIME], I am having a POJO with field LocalTime localTime; Now, I am using mybatis to map checkout_time to LocalTime localTime using: <result ...
Stotra's user avatar
  • 103
1 vote
1 answer
935 views

I'm trying to plot some time series data whose source times are UNIX timestamps (seconds since 1970) and I want to see date/times in my local timezone on the x-axis. I'm using the DataFrame.plot ...
Cameron Simpson's user avatar
-3 votes
1 answer
78 views

This is in my constructor in class Office. public Office(String name, String location, LocalTime openingTime, LocalTime closingTime) { this.name = name; this.location = location; ...
GitaGovinda's user avatar
0 votes
0 answers
89 views

ltime=time(NULL); sprintf(buffer,"\n%sTwo matrices of size %dx%d have been read. The number of threads is %d \n",asctime(localtime(&ltime)),side_Array,side_Array,val_M); write(...
cBwavez's user avatar
0 votes
2 answers
540 views

I have specific DateTime values in this format 'YYYY-MM-DDThh:mm:ss.ms' (e.g. '2022-05-10T13:44:00.0000000') and I need to convert them to local DateTime (which is UTC+2 for me) without changing the ...
Yami's user avatar
  • 39
0 votes
1 answer
482 views

The question is when I save the value between "12:00 AM"~"8:15 AM" in DB, and query the data using hibernate, it will automatically adding 5 mins. I have tried using hibernate ...
dustinleong's user avatar
0 votes
1 answer
185 views

I would like to do it by constantly checking local time in my computer. Is there also a way to do it by NOT checking with time of local machine? I want to also program not execute certain statements ...
user avatar
0 votes
1 answer
394 views

If I do: $ jq -cn 'now | localtime' [2022,3,12,21,9,29.65448808670044,2,101] It correctly gives the "broken down time" representation of current local time. But If I do: $ jq -cn 'now | ...
Logan Lee's user avatar
  • 1,035
0 votes
1 answer
1k views

I got this value from an API 2022-03-15T02:33:53.488427, it is a string which represents a UTC timestamp, my current zone time is UTC-5, I'm trying this code: createdAt = DateTime.tryParse('2022-03-...
Ουιλιαμ Αρκευα's user avatar
0 votes
1 answer
808 views

I am trying to find the difference in time between two LocalTime objects in HH:MM:SS format and my duration object is giving me the error Duration.between cannot be resolved to a type. The between ...
CoolHands's user avatar
2 votes
2 answers
269 views

Using the following code: class Test { public static void main(String [] args) { LocalDate date = LocalDate.of(2018, 11, 4); LocalTime time = LocalTime.of(1, 59); ...
Nicolae Fratila's user avatar
0 votes
0 answers
29 views

I am plotting a linechart with JFreeChart. X axis of the linechart should be time and I want to get this time as a string like "08:20:20,19". When I am trying to convert LocalTime to ...
shnnens's user avatar
  • 21

1
2 3 4 5
10