~ubuntu-branches/debian/squeeze/f-spot/squeeze

« back to all changes in this revision

Viewing changes to dpap-sharp/lib/Utility.cs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane, Mirco Bauer, Iain Lane
  • Date: 2009-02-07 20:23:32 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20090207202332-oc93rfjo1st0571s
Tags: 0.5.0.3-2
[ Mirco Bauer]
* Upload to unstable.
* debian/control:
  + Lowered GNOME# build-deps to 2.0 ABI as that transition didn't happen
    yet in unstable.

[ Iain Lane ]
* debian/patches/svn-r4545_locales-import.dpatch: Patch backported from SVN
  trunk revision 4545 - initialize the translation catalog earlier (LP: #293305)
  (Closes: #514457). Thanks to Florian Heinle for finding the patch and to
  Chris Coulson for preparing the update.
* debian/control: Build-depend on libmono-dev (>= 1.2.4) to match configure
  checks.
* debian/rules: Pass CSC=/usr/bin/csc to configure for gio-sharp to fix FTBFS

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Utility.cs
 
2
//
 
3
// Author:
 
4
//   James Willcox <snorp@snorp.net>
 
5
//
 
6
//  Copyright (C) 2005  James Willcox <snorp@snorp.net>
 
7
//
 
8
// This program is free software; you can redistribute it and/or modify
 
9
// it under the terms of the GNU General Public License as published by
 
10
// the Free Software Foundation; either version 2 of the License, or
 
11
// (at your option) any later version.
 
12
//
 
13
// This program is distributed in the hope that it will be useful,
 
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
16
// GNU General Public License for more details.
 
17
// 
 
18
// You should have received a copy of the GNU General Public License
 
19
// along with this program; if not, write to the Free Software
 
20
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
21
//
 
22
//
 
23
 
 
24
using System;
 
25
 
 
26
namespace DPAP {
 
27
 
 
28
    internal class Utility {
 
29
 
 
30
        private static DateTime epoch = new DateTime (1970, 1, 1).ToLocalTime ();
 
31
        
 
32
        public static DateTime ToDateTime (int time) {
 
33
            return epoch.AddSeconds (time);
 
34
        }
 
35
 
 
36
        public static int FromDateTime (DateTime time) {
 
37
            return (int) time.Subtract (epoch).TotalSeconds;
 
38
        }
 
39
    }
 
40
}