Skip to main content
summaryrefslogtreecommitdiffstats
blob: 3b4c852d8d41cdeefecd201a24b56dc11f1ac856 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*******************************************************************************
 * Copyright (c) 2007, 2018 compeople AG and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * 	compeople AG (Stefan Liebig) - initial API and implementation
 *******************************************************************************/
package org.eclipse.equinox.p2.tests.sar;

import static org.junit.Assert.assertEquals;

import org.eclipse.equinox.internal.p2.sar.SarEntry;
import org.junit.Test;

public class SarEntryTest {

	@Test
	public void testJavaToDosTimeAndBack() {
		final long minute = 1000l * 60l;
		long now = (System.currentTimeMillis() / minute) * minute;
		long dos = SarEntry.javaToDosTime(now);
		assertEquals(now, SarEntry.dosToJavaTime(dos));
	}

}

Back to the top