Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Java data type corresponds to postgresql "time without zone"

I thought it was java.sql.Time but several methods within this class are deprecated. It has only one constructor that receives a long data type argument, just like this.

Time(long time)

I get from the user a string with the following format: hh:mm

Any advices on how I can achieve this?

Thanks.

like image 816
Sandoval0992 Avatar asked Nov 28 '25 21:11

Sandoval0992


1 Answers

Have a look at

java.time.LocalTime

added in Java8

like image 73
Saravana Avatar answered Nov 30 '25 12:11

Saravana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!