I'm interested in finding a solution to take the current time and date using C# and then using that value to set the time and date to set the clock in Linux. This would execute ideally on a button click in Visual Studio Windows Forms and would take the current time and date generated through C# to send that value to Linux OS via a packet. I'm just wondering how to format the value created in C# so that it translates in a way that is relevant by setting the date and time in Linux.
The date and time value is going to be sent to a separate computer running Linux that receives information from the windows based computer via a packet
DateTime now = DateTime.Now;
and then something like
date --set="now"