c# – When Receiving/Returning data in controller action – DateTime conversion between UTC and Epoch in Asp.net core WebAPI

I was wondering what would be a better approach designing a system which deals with UTC DateTime in the service and Database layer but needed to send and receive the DateTime in Epoch format from remote agents.

Consider the following Class (model):

public class UserProfile
{
    (DataType(DataType.EmailAddress))
    public string Email { get; set; }

    public DateTime SomeDate { get; set; }
}

Now if if the APIs needs the value of the SomeDate to be in Epoch format (like Dotnet long type instead of DateTime but the system needs to have the data in UTC DateTime format to process and store in the service codes.

Considering there would be many REST APIs and different models, what would be a global solution to handle the issue. Can this be solved with auto mapper or action filter or something like that?