Files
MinFt/Client/Assets/Scripts/DataCenter/DateTimeExtensions.cs
Liubing\LB 3d8d4d18f3 first commit
先修复一下,错误的场景

删除不必要的钓场资产

修复into场景

update:更新meta文件,修复报错

update:修复资源

修复第一章节建造

修复建造第三章

update:删除多余内容

update:更新README.md

update:还原图标

update:更新README

update:更新配置
2026-04-28 02:17:22 +08:00

24 lines
831 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using asap.core;
using cfg;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class DateTimeExtensions
{
/// <summary>
///游戏时间,配置 9UTC-9对应经度范围 127.5°W 142.5°W 的本地时间,中央经线为 135°W。
///计算每周几、每日几时(跨天=每日0时这种到期时间
///或者统一计算需求 调用此方法
///自己记录时间段 比如从当前时间往后推一段时间 不需要调用此方法
/// </summary>
/// <param name="dateTime"></param>
/// <returns></returns>
public static DateTime UtcNowOffset(this DateTime dateTime)
{
var offset = GContext.container.Resolve<Tables>().TbGlobalConfig.GlobalTimeOffset;
return dateTime.AddHours(-offset);
}
}