how to set system clock

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
dkaip
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 215
Joined: Wed Jan 20, 2010 1:15 pm

how to set system clock

Post by dkaip » Mon Oct 31, 2016 6:25 am

Hello.
I must set linux system clock via wxDateTime.
How i can do this?

Thank's

Jim

User avatar
doublemax
Moderator
Moderator
Posts: 14098
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: how to set system clock

Post by doublemax » Mon Oct 31, 2016 10:17 am

To my best knowledge there is no wxWidgets function for this.
Use the source, Luke!

DavidHart
Site Admin
Site Admin
Posts: 3889
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: how to set system clock

Post by DavidHart » Mon Oct 31, 2016 10:25 am

Hi,

I don't know of one either.

However you should be able make a system call using wxExecute(), using the ideas in this link. You may need superuser privileges, though.

Regards,

David

User avatar
shawnhcorey
Knows some wx things
Knows some wx things
Posts: 34
Joined: Mon Nov 19, 2012 3:29 pm
Location: The Great White North

Re: how to set system clock

Post by shawnhcorey » Mon Oct 31, 2016 11:10 am

Your progam has to have root privileges to set the date & time. You may have to use the system function stime.

Post Reply