28 lines
619 B
C#
28 lines
619 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DOAN.Infrastructure
|
|
{
|
|
public class ConvertDateTime
|
|
{
|
|
/// <summary>
|
|
/// 日期转本地日期
|
|
/// </summary>
|
|
/// <param name="handleDate"></param>
|
|
/// <returns></returns>
|
|
public static DateTime ConvertLocalDate(DateTime handleDate)
|
|
{
|
|
if (handleDate.Kind == DateTimeKind.Utc)
|
|
{
|
|
handleDate = handleDate.ToLocalTime();
|
|
|
|
}
|
|
|
|
return handleDate.Date;
|
|
}
|
|
}
|
|
}
|