# 网络时间同步程序 **Repository Path**: YJHmath/mntp ## Basic Information - **Project Name**: 网络时间同步程序 - **Description**: 基于陈硕MUDUO库魔改例程做出来的时间同步一体服务客户端 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-26 - **Last Updated**: 2025-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 时间同步服务器/客户端 ## 运行指令 ``` # 服务器 MNTP -s 124 # 客户端(这里时间偏移秒数系:-57600=-2x8x3600), # 经验证, g_offsetSec=--2x8x3600, 然后再调用settimeofday配置时间, # client的UTC时间及Local时间才正确; 也就说, their的时间是已经加了 # 8小时, 然后settimeofday()是只配置本机的UTC Time; MNTP -s 124 -o -57600 ```