// 根据注册时间计算整个活动到期时间和七天任务结束时间//
    public void calculateActiveOverTime(int loginTime)
    {
        DateTime dt       = TimeKit.getDateTime(loginTime);
        DateTime dt_start = new DateTime(dt.Year, dt.Month, dt.Day, 0, 0, 0);

        this.activeEndTime       = TimeKit.timeSecond(TimeKit.getTimeMillis(dt_start)) + 7 * 86400 + 2 * 86400;
        this.activeMissonEndTime = TimeKit.timeSecond(TimeKit.getTimeMillis(dt_start)) + 7 * 86400;
    }
    public long getSecondDayTime(long loginTime)
    {
        DateTime dt_loginTime     = TimeKit.getDateTimeMillis(loginTime);
        DateTime dt_secondDayTime = new DateTime(dt_loginTime.Year, dt_loginTime.Month, dt_loginTime.Day, 23, 59, 59);

        secondDayTime = TimeKit.getTimeMillis(dt_secondDayTime) + 1000;
        DateTime dt = TimeKit.getDateTimeMillis(secondDayTime);

        return(secondDayTime);
    }
Example #3
0
    //得到活动开启状态
    public int getHolidayActionsTate()
    {
        DateTime timen = TimeKit.getDateTimeMillis(ServerTimeKit.getMillisTime());
        string   date  = timen.ToShortDateString().ToString();

        string[] atcieTime = WeeklyAwardConfigManager.Instance.getTimee();
        for (int i = 0; i < atcieTime.Length; i++)
        {
            DateTime begin = Convert.ToDateTime(atcieTime[i].Split(',')[2]);
            DateTime end   = Convert.ToDateTime(atcieTime[i].Split(',')[3]);
            if (TimeKit.getTimeMillis(begin) <= TimeKit.getTimeMillis(timen) && TimeKit.getTimeMillis(end) >= TimeKit.getTimeMillis(timen))
            {
                return(StringKit.toInt(atcieTime[i].Split(',')[0]));
            }
        }
        return(0);
    }